vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   vBa: Show GARS article image on article (https://vborg.vbsupport.ru/showthread.php?t=99486)

Cole2026 10-27-2005 10:00 PM

vBa: Show GARS article image on article
 
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:
PHP Code:

$news['message'] = substr($news['message'], 0strrpos(substr($news['message'], 0$mod_options['portal_news_maxchars']), ' ')) . '...' construct_phrase($vbphrase['read_more'], $vbulletin->options['bburl'], $news['threadid'], $session['sessionurl']);
                } 

Below Add:
PHP Code:

// 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.

HTML Code:

<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.

Okie 10-28-2005 03:58 AM

where to download GARS ?

redspider 10-28-2005 07:28 AM

I try this and I get this on my potal:
Parse error: parse error, unexpected $ in /domains/myredspider.net/public_html/home/modules/news.php on line 333

jluerken 10-28-2005 07:36 AM

Quote:

Originally Posted by Okie
where to download GARS ?


www.thevbgeek.com

you have to buy it there first to get access to the download area.
RC will be released soon.

redspider 10-28-2005 08:02 AM

I got my problem fix thank you any way .

Ozster 10-28-2005 12:29 PM

i really want to buy most of the geek stuff but its all in beta at the moment

Odysseus 10-28-2005 04:01 PM

Quote:

Originally Posted by Ozster
i really want to buy most of the geek stuff but its all in beta at the moment

GARS, at least, will come to RC state soon.
Hopefully! :)

jluerken 11-07-2005 12:44 PM

Quote:

Originally Posted by Odysseus
GARS, at least, will come to RC state soon.
Hopefully! :)

It has reached RC level yesterday! :D

Jorg 11-20-2005 08:55 PM

I used the code and works perfect! Thanks.

Cole2026 11-25-2005 10:46 PM

Quote:

Originally Posted by Jorg
I used the code and works perfect! Thanks.

:)

BTW, updated the code, No real reason for a query_read and a which when I can just fetch the array using the query_first function.

Also used a free_result function to free up the results of the query so we can clear the little memory we are using with this query in the cache.

Templates were changed slightly too. (Mandatory to change templates if you are going to change the code and use my update.) This update does not add any functionality to the script, it just makes it a bit more efficient. If you currently have the script installed, you can just bypass the update if you want.


All times are GMT. The time now is 08:22 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01163 seconds
  • Memory Usage 1,747KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (2)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete