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 06-12-2008, 01:48 PM
Namaless Namaless is offline
Member
 
Join Date: Oct 2007
Posts: 50
Geek Article and Review System License Holder Geek Auto-Linker Pro License Holder 
Exclamation [BUG] Custom Field - Upload Image

I found one bug (not sure).. I have added File Upload Custom Field and when upload image into DB get double link, example: http://www.url.com/geek/gars/images/...ages/0/img.gif

If not a bug please give me support for this..

I have created this field for require Picture Poster.. if possible to require Header Image I more happy.. I found this solution for require Header Image..

Thanks.. Regards.
Reply With Quote
  #2  
Old 06-13-2008, 01:08 AM
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

Not a bug. Both 'Thumbnail to original image upload' and 'Thumbnail to URL' store in that fashion. One is for A HREF and the other is for IMG SRC and they are not necessarily the same. Header image is something you can allow or disallow but there is no make is required option for it. Untested but you can try removing the red and adding the green in the gars_class_edit.php file and test it to see if it forces the user to upload a header image:
Code:
                if (!$uploaded_url)
                {
                        $errors[] = 'You must upload a header image.';
                        if ($this->vb->GPC['GARS_header_image'])
                        {
                                $header_image = $this->vb->GPC['GARS_header_image'];
                        }
                        elseif ($this->vb->GPC['GARS_existing_image'])
                        {
                                $header_image = $this->vb->GPC['GARS_existing_image'];
                        }
                        else
                        {
                                $header_image = $this->settings['url_to_header_images'] . '/' . $this->type['default_image'];
                        }
                }
                else
                {
                        $header_image = $uploaded_url;
                }
__________________
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 06-13-2008, 06:26 AM
Namaless Namaless is offline
Member
 
Join Date: Oct 2007
Posts: 50
Geek Article and Review System License Holder Geek Auto-Linker Pro License Holder 
Default

Thanks for this mod.. If I want use Custom Field for Picture Poster you suggestion code?

Example for me use Explode comma delimiter and use the first array.. You have more suggestions?

Regards.
Reply With Quote
  #4  
Old 06-13-2008, 11:54 AM
Namaless Namaless is offline
Member
 
Join Date: Oct 2007
Posts: 50
Geek Article and Review System License Holder Geek Auto-Linker Pro License Holder 
Default

Tested, but when edit the release the header images is not reloaded.. now try to edit the mods for enable this.. if any suggestions please give me..
Reply With Quote
  #5  
Old 06-13-2008, 11:59 AM
Namaless Namaless is offline
Member
 
Join Date: Oct 2007
Posts: 50
Geek Article and Review System License Holder Geek Auto-Linker Pro License Holder 
Default

PHP Code:
if (!$uploaded_url)
                {
                        if (
$this->vb->GPC['GARS_header_image'])
                        {
                                
$header_image $this->vb->GPC['GARS_header_image'];
                        }
                        elseif (
$this->vb->GPC['GARS_existing_image'])
                        {
                                
$header_image $this->vb->GPC['GARS_existing_image'];
                        }
                        else
                        {
                                
//$header_image = $this->settings['url_to_header_images'] . '/' . $this->type['default_image'];
                                
$errors[] = $this->vbphrase['GARS_err_require_header_image'];
                        }
                } 
With this modification works correctly.. if not uploaded get error, if the header images is uploaded reloaded correctly..
Reply With Quote
  #6  
Old 06-15-2008, 04:40 PM
Namaless Namaless is offline
Member
 
Join Date: Oct 2007
Posts: 50
Geek Article and Review System License Holder Geek Auto-Linker Pro License Holder 
Default

Found one problem: if into type is disabled the header image, get error.
I found this solution:
PHP Code:
if ( !$this->type['noheader'] )
{
    
$errors[] = $this->vbphrase['GARS_err_require_header_image'];

Is good solution?

Regards.
Reply With Quote
  #7  
Old 06-16-2008, 04:41 AM
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

Does it do what you want it to do? If so then it seems fine.
__________________
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
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
Custom Upload field mangus580 Geek Article and Review System 6 11-11-2008 04:58 AM
deleting custom field image? lazyseller Geek Article and Review System 1 09-25-2008 12:48 AM
Problem with custom field thmbnail to original image playeradvance Geek Article and Review System 8 06-08-2007 06:12 PM
Header Image/Custom Field Thumbnail Jei Geek Article and Review System 4 05-21-2007 08:41 AM
Custom field - URL for image. vat0r Geek Article and Review System 3 02-04-2007 11:00 PM


All times are GMT. The time now is 02:06 PM.


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