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 KW802 on 11-16-2005, 05:40 PM
Default

newave, "vBa" is short for vBadvanced. In this case it's the vBadvanced CMPS portal that is being referenced.

http://www.vbadvanced.com
Reply With Quote
  #7  
By Lizard King on 11-17-2005, 03:12 AM
Default

For the template wouldn't be better
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>
Reply With Quote
  #8  
By Jorg on 11-18-2005, 11:38 PM
Default

Cole, thanks for the contribution! This is exactly what I needed!
Lizardking, thanks for the modification!

Reply With Quote
  #9  
By Cole on 11-19-2005, 04:56 PM
Default

Quote:
Originally Posted by newave
Hello Cole,

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
Since GARS transforms your normal forums into an article type system, you can use vBadvanced(vBA is a CMPS system) to show those entries from the forums on your forumhome. But, vBadvanced does not have the feature that allows you to put the topic image you have uploaded on the frontpage, and this modification allows you to do so.
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 10:03 AM.


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

Release powered by GARS 2.1.9 ©2005-2006