Hi,
I've got my main page built using vBulletin templates. I use the following code to build the latest links summary.
mysql_select_db("geobaby_resources",$linksdb_id);
$links_res = mysql_query("select Add_Date from lsql_Links group by Add_Date order by Add_Date desc limit 5");
while ($links = mysql_fetch_array($links_res)) {
$links_count_res = mysql_query("select count(*) as total from lsql_Links where Add_Date='$links[Add_Date]'");
$links_count = mysql_fetch_array($links_count_res);
eval("\$links_latest_bits .= \"".gettemplate("links_latest_bit")."\";");
}
How would I turn the "links_latest_bits" into a global that I can insert into a template?
I've figured it out to the point where I need to go to Build -> Template Globals and then add a global variable. Not sure how to code this in perl.
Can someone help me?
Thanks :)
Shri
I've got my main page built using vBulletin templates. I use the following code to build the latest links summary.
Code:
mysql_select_db("geobaby_resources",$linksdb_id);
$links_res = mysql_query("select Add_Date from lsql_Links group by Add_Date order by Add_Date desc limit 5");
while ($links = mysql_fetch_array($links_res)) {
$links_count_res = mysql_query("select count(*) as total from lsql_Links where Add_Date='$links[Add_Date]'");
$links_count = mysql_fetch_array($links_count_res);
eval("\$links_latest_bits .= \"".gettemplate("links_latest_bit")."\";");
}
How would I turn the "links_latest_bits" into a global that I can insert into a template?
I've figured it out to the point where I need to go to Build -> Template Globals and then add a global variable. Not sure how to code this in perl.
Can someone help me?
Thanks :)
Shri