The vB Geek

Go Back   The vB Geek > vB Geek Modifications > Add-ons

Add-ons Modifications and add-ons for vB Geek stuff.

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

Comment
 
Release Tools Display Modes
Cole
Junior Member

vB Version: x
 

Mod Version: x
 

Released: 11-02-2005
 

Installs: 34
 

Last Update: n/a
 

Rating:
 
Supported
DB Changes
Installer Included
Uses Plugins
Template Changes
Code Changes
Additional Files
Is a Beta!
Default Topic Image on vBA articles.

I whipped this up for my forums a couple weeks ago.

This will display the topic image along with the article on vBA home (If you get the feed from the forum where articles are defined, you will see the article image in the template).

Modifications needed (in #FORUM_DIR#/modules/news.php): [vBA File]

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 = array();
                
$getgeek $db->query_read("SELECT header_image FROM " TABLE_PREFIX "gars WHERE threadid=" .$news['threadid'] . "");
 
                while (
$geeksql $db->fetch_array($getgeek)) {
                    
$geek[] = $geeksql['header_image'];
                }
    
// / 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.

Better template modification contributed by Lizard King.

HTML Code:
<if condition="$geek[0]"> <img align="$stylevar[left]" src="$geek[0]" 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.
Release

Release Tools

  #1  
By The Geek on 11-02-2005, 08:53 PM
Default

Superb! Looks great.
Reply With Quote
  #2  
By ihatetyping on 11-02-2005, 11:09 PM
Default

Yes it does look great & thanks for sharing your coding skills "Cole".
Reply With Quote
  #3  
By NCangler on 11-10-2005, 12:40 AM
Default

I tried to use this but when I made the edit to new.php I get this error message:

Parse error: parse error, unexpected T_VARIABLE in /forums/modules/news.php on line 180

Line 180 is: $geek = array();
Reply With Quote
  #4  
By eko on 11-10-2005, 03:02 AM
Default

any screenshots or demos of this? thanks great work
Reply With Quote
  #5  
By newave on 11-14-2005, 03:26 PM
Default

Hello Cole,
Quote:
This will display the topic image along with the article on vBA home
What is "vBA" ? Is it the vbarticle extension ? vbarticle is not for Vb 3.5 isn't it ?

I can see on your home page (http://www.digitalsupremacy.com) that the list of articles display articles from different forums and sub-categries forums. Is it possible to do this with GARS (we've bought it and we made a lot of tests, but can't find the way to do this ) ?...

Thanks for your help...

Best Regards
Reply With Quote
  #6  
By Stachel on 11-19-2005, 06:40 PM
Default

Quote:
Originally Posted by Cole
This will display the topic image along with the article on vBA home (If you get the feed from the forum where articles are defined, you will see the article image in the template).
If 3 images are posted with the main article, which one is put on the home page? The first one?

Quote:
Originally Posted by Cole
http://www.digitalsupremacy.com
Nice forum, & look & feel of site! I will join!

Stachel
Reply With Quote
  #7  
By Cole on 11-19-2005, 08:06 PM
Default

Quote:
Originally Posted by Stachel
If 3 images are posted with the main article, which one is put on the home page? The first one?

Nice forum, & look & feel of site! I will join!

Stachel
GARS has an image upload feature (Like the image for the article, this takes that and puts it on the front page.

And thanks for the comments about my website.
Reply With Quote
  #8  
By Cole on 11-20-2005, 09:41 PM
Default

Uh, anyone who wants to show their support for the modification:

Install Please @ vB.Org
http://www.vbulletin.org/forum/showthread.php?t=99486
Reply With Quote
  #9  
By Fleabag on 05-23-2006, 04:56 AM
Default

Doesn't seem to work with Gars 2.0.
Reply With Quote
Comment

Release 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
Release Release Starter Category Comments Last Post
how to make Top 5 Articles block show up on frontpage (vbA CMPS) beowulf68 Geek Article and Review System 1 02-23-2008 10:29 AM
Topic Image and vBa? wolf32 Geek Article and Review System 4 06-13-2007 08:39 PM
Max image number for articles (GARS 2.0) Zazula Geek Article and Review System 3 01-12-2007 08:13 AM
of topic? beduino Lizard Lounge 1 11-10-2006 04:28 AM
I don't think this is necessarily off topic, but I must say I'm impressed so far... FRAiD Lizard Lounge 1 11-12-2005 09:55 AM


All times are GMT. The time now is 09:24 AM.


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

Release powered by GARS 2.1.9 ©2005-2006