The vB Geek

Go Back   The vB Geek > vB Geek Products > Geek Auto-Linker

Geek Auto-Linker GAL automatically links keywords that users type in posts to advertising hover pop-ups.

Advertisement
This is an HTML example. Isn't it just wonderful?!?!
  Learn how to remove ads

Reply
 
Thread Tools Display Modes
  #1  
Old 11-01-2008, 11:38 PM
Stavrogin Stavrogin is offline
Junior Member
 
Join Date: Aug 2008
Posts: 2
Geek Article and Review System License Holder Geek Auto-Linker Pro License Holder Geek Gazette License Holder 
Default Latest entry in glossary?

Is it possible to use GAL to display the Latest Entry in the Glossary on a forum homepage? I used the following code (from this hack for the vBadvanced Links Directory) to show the latest link:

Code:
if ($forum['forumid'] == 'XX')
				{
				global $db; 
				$tot = $db->query_first("SELECT COUNT(*) as count FROM " . TABLE_PREFIX . "adv_links");
				$link = $db->query_first("SELECT linkid , name, posts, username, userid, dateline FROM " . TABLE_PREFIX . "adv_links ORDER BY linkid DESC");
				$date = vbdate($vbulletin->options['dateformat'], $link['dateline'], 1);
				$time = vbdate($vbulletin->options['timeformat'], $link['dateline']);		
				$forum['lastpostinfo'] = '<div align="left" class="smallfont"><strong><a href="/showcase/showlink.php?do=showdetails&l='.$link[linkid].'">'.$link[name].'</a></strong><br />by <a href="member.php?find=lastposter&f='.$link[userid].'">'.$link[username].'</a><br /><span style="float:right;">'.$date.' '.$time.' <a href="/showcase/showlink.php?do=showdetails&l='.$link[linkid].'"><img src="images/buttons/lastpost.gif" border="0" alt="View showcase"></a></span></div>';
				$forum['threadcount'] = $tot['count'];
				$forum['replycount'] = $link['posts'];				
				}
Here XX was replaced by the forumid I used. I'd like to do something similar with GAL but is it possible and, if so, how could it be achieved? The result would be a forum on the homepage that links directly to GAL (glossary.php) but shows the details of the latest entry in the "Last Post" column. Any ideas?
Reply With Quote
  #2  
Old 11-03-2008, 03:52 PM
Morgan's Avatar
Morgan Morgan is offline
Administrator
 
Join Date: Jul 2006
Posts: 2,255
Geek Article and Review System License Holder GeekMart License Holder Geek Auto-Linker Pro License Holder Geek Advertising Banner License Holder Geek Gazette License Holder 
Default

Custom coding really falls outside the realm of support and is not typically offered, especially for larger requests, but here is a query you could try to get the most recent entry in the gal database table:
Code:
# add your vB table prefix to the gal table name if you use a prefix
SELECT * FROM gal ORDER BY id DESC LIMIT 1;
__________________
Please use the forums for support, feature requests, and similar such things. Support does not include custom code, custom template edits, or third-party modifications. PMs and emails to me should be for private information only, such as login information. If you PM or email me a support question, chances are good that I'll ignore it. Thanks.
While the work or play is on, it is a lot of fun if while you are doing one you don't constantly feel that you ought to be doing the other. -- Franklin Pierce Adams
Reply With Quote
  #3  
Old 11-03-2008, 05:03 PM
Stavrogin Stavrogin is offline
Junior Member
 
Join Date: Aug 2008
Posts: 2
Geek Article and Review System License Holder Geek Auto-Linker Pro License Holder Geek Gazette License Holder 
Thumbs up

Thanks, Morgan. I'll give that a try.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Entry Column RaceJunkie Geek Auto-Linker 1 02-04-2008 03:52 PM
Making a new entry.. gldtn Geek Auto-Linker 7 01-29-2008 09:48 PM
Glossary with 4.81 Cliff Geek Auto-Linker 3 01-10-2007 04:35 PM
valid GAL entry joh Geek Auto-Linker 20 10-25-2006 06:28 PM
What is the userid entry for? Brent Geek Advertising Banner System 2 02-13-2006 09:53 PM


All times are GMT. The time now is 11:56 AM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.