The vB Geek

Go Back   The vB Geek > vB Geek Products > Geek Article and Review System

Geek Article and Review System GARS is the mega popular system for turning forums into articles, tutorials, or even reviews.

Advertisement
  Learn how to remove ads

Reply
 
Thread Tools Display Modes
  #1  
Old 10-22-2008, 09:22 PM
mreyes mreyes is offline
Junior Member
 
Join Date: Jul 2008
Posts: 19
Geek Article and Review System License Holder 
Default A question about header images/gallery

I currently have GARS setup in such a way that members can upload new header images and add them to the gallery.

However as time goes by this gallery is getting very large as most members upload a unique image every time they post. So the question is can I disable gallery selections and still allow image uploads? Also, if the user decides to not upload it uses a default image.

Alternatively, is there any way to display an uploaded thumbnail (from a "Thumbnail to original image upload" custom field) agaisnt the item entry on the GARS forumdisplay page (i.e. where the normal gallery pic would be displayed)

Last edited by mreyes; 10-22-2008 at 10:22 PM..
Reply With Quote
  #2  
Old 10-23-2008, 03:43 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

Untested but look for the following in the gars_class_edit.php file and add the bold red bit to be rid of the gallery bits:
Code:
                        if (1==2 && $this->settings['ugs_allow_gallery'] && !$typeinfo['noheader'])
If that doesn't do what you want, again untested, but in the gars_class_edit.php file find the second occurrence of the following and add the bold red bit:
Code:
if (1==2 && is_dir($path))
Also untested but you could instead add a template conditional to the GARS_gallery_bit template to be rid of some bits:
Code:
<if condition="in_array($gallery_image, array('LINK1', 'LINK2', 'LINK3'))">
            template content here
</if>
For default images go to the ACP -> GARS -> Types -> click a type -> Header image info. More information about this section can be found here.
__________________
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 10-23-2008, 08:43 PM
mreyes mreyes is offline
Junior Member
 
Join Date: Jul 2008
Posts: 19
Geek Article and Review System License Holder 
Default

Hi Morgan,

thanks for the reply, oddly enough between posting and seeing your reply I had tried similar ish hacks and got it to work, however....

After messing around for a while it just wasn't quite was I looking for so I reverted the code back to default and I have disable the header gallery and image uploads. Now members can optionally upload an image via a ""Thumbnail to original image upload" custom field.

All of which leads me to a question I asked badly before, is there anyway to display this uploaded thumbnail against the listing title/summary on GARS forumdisplay pages?
Reply With Quote
  #4  
Old 10-27-2008, 12:32 PM
mreyes mreyes is offline
Junior Member
 
Join Date: Jul 2008
Posts: 19
Geek Article and Review System License Holder 
Default

Problem Solved

It turns out that the select statement that populates the forumdisplay page already includes any custom fields the entry might have.

So it was then just a question of creating a custom template set that used a custom template for forum display. In this template where it would normally show the header/gallery image this now displays the thumbnail if the user uploaded one and a default if they didn't. If they click the image the user is taken to the showthread page. Job done.

The only gotcha for this was that the value of the thumbnail image custom fields is in the following format:

url to thumbnail,url to full image

So I had to hack the "GARS - Threadbit Display | threadbit_display" plugin to parse out the path to the thumbnail with a simple split command and put it into a "$thread['ForumDisplayThumb']" variable so it can be used in the template. If on template parse this value isn't set the template (via a conditional) displays a default placeholder image.
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
Limit / delete gallery images Cliff Geek Article and Review System 5 01-11-2008 02:19 PM
Question about Header Images pcoskat Geek Article and Review System 5 01-04-2008 11:11 PM
Lots of gallery images ericguttormson Geek Article and Review System 2 07-28-2007 12:28 PM
Remove Gallery Images sab2000sab Geek Article and Review System 2 06-15-2006 08:00 PM
Gallery images psplounge Geek Advertising Banner System 8 11-28-2005 09:06 AM


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


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