2015-05-17, 03:18 AM
I want to ask about threadfields value.
i already use showcase forum xthreads and there is
it's show in forum display template like this
i want to ask about {$GLOBALS['threadfields']['scfurl']}, can i use this code to display it in index.php?
i want to display latest showcase forum and the details like Name and URL in index.php, how could i do that?
i already add that code {$GLOBALS['threadfields']['scfurl']} to index template and nothing happen:|
I do read this
but how to call it in index.php?
thanks for ur help
i already use showcase forum xthreads and there is
2. Next, we will create a textbox for Website URL:
Create a Custom Thread Fields with this settings:
Title: Website URL
Key: scfurl
Description: e.g: www.yoursite.com
Applicable Forums: 'select the forum in point 1'
Input Field Type: Textbox
Editable by / Required Field?: Everyone (required)
Display Order: 2
Later, we need to put {$GLOBALS['threadfields']['scfurl']} variable to display it into our template.
Quote:http://mybbhacks.zingaburga.com/showthre...56#pid1556
it's show in forum display template like this
Link : <a href="http://{$GLOBALS['threadfields']['scfurl']}"><strong>{$GLOBALS['threadfields']['scfname']}</strong></a>
i want to ask about {$GLOBALS['threadfields']['scfurl']}, can i use this code to display it in index.php?
i want to display latest showcase forum and the details like Name and URL in index.php, how could i do that?
i already add that code {$GLOBALS['threadfields']['scfurl']} to index template and nothing happen:|
I do read this
// only 'username' and 'fid' keys are used from the $thread array
function xthreads_get_threadfields($tid, &$threadfields, $noextra=true, $thread=array()) {
$tid = (int)$tid;
if(!$tid) return;
if(empty($thread))
$thread = get_thread($tid);
if($thread['fid'] == $GLOBALS['fid']) // use global cache if we're referring to current forum
$threadfield_cache =& $GLOBALS['threadfield_cache'];
if(!isset($threadfield_cache))
$threadfield_cache = xthreads_gettfcache((int)$thread['fid']);
if(!empty($threadfield_cache)) {
global $db;
$threadfields = $db->fetch_array($db->simple_select('threadfields_data', '`'.implode('`,`', array_keys($threadfield_cache)).'`', 'tid='.$tid));
if(!isset($threadfields)) $threadfields = array();
foreach($threadfield_cache as $k => &$v) {
xthreads_get_xta_cache($v, $tid);
xthreads_sanitize_disp($threadfields[$k], $v, $thread['username'], $noextra);
}
}
}
but how to call it in index.php?
thanks for ur help