Cole2026
10-27-2005, 10:00 PM
I whipped this up for my forums, and it may be of use to some people.
GARS (Geek Article and Review System) - is a system by the geek (http://www.thevbgeek.com) that transforms a forum into a fully disguised articles, reviews, tutorial system ,and so on.
This, will display the article image icon that is included with the article you are using on the vBadvanced system.
Modifications needed (in #FORUM_DIR#/modules/news.php):
Find:
$news['message'] = substr($news['message'], 0, strrpos(substr($news['message'], 0, $mod_options['portal_news_maxchars']), ' ')) . '...' . construct_phrase($vbphrase['read_more'], $vbulletin->options['bburl'], $news['threadid'], $session['sessionurl']);
}
Below Add:
// GARS modification
$geek = $db->query_first("SELECT header_image FROM " . TABLE_PREFIX . "gars WHERE threadid=" .$news['threadid'] . "");
$db->free_result($geek);
// / GARS modification
Then, in templates, you can insert in the vBA newsbit (adv_portal_newsbit)
this code anywhere where you want the image to appear for that article.
<if condition="$geek[header_image]"> <img align="$stylevar[left]" src="$geek[header_image]" alt="" style="padding:6px" alt="" border="0"/> <else /> <img align="$stylevar[left]" style="padding:6px" alt="" border="0" src="$news[avatarpath]" title="$news[postusername]'s $vbphrase[avatar]" /> </if>
Demo: http://www.digitalsupremacy.com
Enjoy.
GARS (Geek Article and Review System) - is a system by the geek (http://www.thevbgeek.com) that transforms a forum into a fully disguised articles, reviews, tutorial system ,and so on.
This, will display the article image icon that is included with the article you are using on the vBadvanced system.
Modifications needed (in #FORUM_DIR#/modules/news.php):
Find:
$news['message'] = substr($news['message'], 0, strrpos(substr($news['message'], 0, $mod_options['portal_news_maxchars']), ' ')) . '...' . construct_phrase($vbphrase['read_more'], $vbulletin->options['bburl'], $news['threadid'], $session['sessionurl']);
}
Below Add:
// GARS modification
$geek = $db->query_first("SELECT header_image FROM " . TABLE_PREFIX . "gars WHERE threadid=" .$news['threadid'] . "");
$db->free_result($geek);
// / GARS modification
Then, in templates, you can insert in the vBA newsbit (adv_portal_newsbit)
this code anywhere where you want the image to appear for that article.
<if condition="$geek[header_image]"> <img align="$stylevar[left]" src="$geek[header_image]" alt="" style="padding:6px" alt="" border="0"/> <else /> <img align="$stylevar[left]" style="padding:6px" alt="" border="0" src="$news[avatarpath]" title="$news[postusername]'s $vbphrase[avatar]" /> </if>
Demo: http://www.digitalsupremacy.com
Enjoy.