The vB Geek

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

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

Advertisement
  Learn how to remove ads

Comment
 
Release Tools Display Modes
 
Old 05-10-2006, 08:00 PM
The Geek's Avatar
The Geek The Geek is offline
Senior Member
 
Join Date: Aug 2005
Posts: 6,717
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 vba CMPS GARS block

This is just a quick vba Module I threw together to try and please the 'Damnit - come up with vba support' people.

This will create 3 different layouts depending on the modules...

Last edited by The Geek; 04-14-2007 at 12:53 PM..
Reply With Quote
  #440  
By concreteweb on 10-10-2008, 06:03 PM
Default

Quote:
Originally Posted by The Geek View Post
You can try editing modules/gars.php and change:

PHP Code:
        if (!$result['image'])
        {
            
$result['image'] = $vbulletin->options['bburl'] . "/geek/gars/images/" $url_to_default_image;
        }
        elseif (
substr($result['image'], 01) == ".")
        {
            
$result['image'] = $vbulletin->options['bburl'] . substr($result['image'], 1);
        }
        else
        {
            
$result['image'] = $vbulletin->options['bburl'] . $result['image'];
        } 
to

PHP Code:
        if (!$result['image'])
        {
            
$result['image'] = $vbulletin->options['bburl'] . "/geek/gars/images/" $url_to_default_image;
        }
        elseif (
substr($result['image'], 01) == ".")
        {
            
$result['image'] = substr($result['image'], 1);
        }
        else
        {
            
$result['image'] = $result['image'];
        } 
You should also be able to do what you want by editing your settings and changing them to $vertical = 0; $limit = 3; and $template = 1;
Thank you very much. *This is what made everything work.
Reply With Quote
  #441  
By Cocko on 11-16-2008, 06:59 PM
Default

Me too

Have a couple of gars.php and modules for cmps.
The last one would not work until above changes.

Thanx.
Reply With Quote
  #442  
By Cocko on 11-18-2008, 03:59 PM
Default

Quote:
Originally Posted by Cocko View Post
Me too

Have a couple of gars.php and modules for cmps.
The last one would not work until above changes.

Thanx.
This issue came back with the next new Thread.
Image path for uploaded image is
http://www.domain.com/vb3http://www....upload_new.jpg

Still searching how to resolve.

Edit:
Now this post could help.
Need to monitor next actions with uploads and without (=default image)
Last edited by Cocko; 11-18-2008 at 04:25 PM..
Reply With Quote
  #443  
By Chris119 on 12-03-2008, 01:50 AM
Default

Does anyone have a demo or screenshot to see how this even looks?
Reply With Quote
  #444  
By Morgan on 12-04-2008, 07:12 AM
Default

Don't use vBa products on this site but maybe someone else will link you to one of their webpages.
Reply With Quote
  #445  
By tazzarkin on 01-01-2009, 02:03 AM
Default

Quote:
Originally Posted by Nordinho View Post
For those interested, to get the module to work in cmps 3.01 change adv_portal_module_shell to adv_portal_module_wrapper on line 105 of the gars.php file.
-----------------------------

This is probably the most valuable post in this whole thread.
Reply With Quote
  #446  
By tazzarkin on 01-01-2009, 01:05 PM
Default

Quote:
Originally Posted by nymyth View Post
well i finally got mines to work, however if someone can just make sure what i did wont mess anything else up:

PHP Code:
while ($result $db->fetch_array($results)) 
    { 

        if (!
$result['image']) 
        { 
            
$result['image'] = $vbulletin->options['bburl'] . "/geek/gars/images/" $url_to_default_image
        } 
        elseif (
substr($result['image'], 01) == "."
        { 
            
$result['image'] = $vbulletin->options['bburl'] . substr($result['image'], 1); 
        } 
        else 
        { 
            
$result['image'] = $vbulletin->options['bburl'] . $result['image']; 
        } 
in the last part i took out the $vbulletin->options['bburl'] so it reads the following:
PHP Code:
while ($result $db->fetch_array($results)) 
    { 

        if (!
$result['image']) 
        { 
            
$result['image'] = $vbulletin->options['bburl'] . "/geek/gars/images/" $url_to_default_image
        } 
        elseif (
substr($result['image'], 01) == "."
        { 
            
$result['image'] = $vbulletin->options['bburl'] . substr($result['image'], 1); 
        } 
        else 
        { 
            
$result['image'] = $result['image']; 
        } 
-----------------------------------------------

This is the 2nd most valuable thread in this posting.
Reply With Quote
  #447  
By tazzarkin on 01-01-2009, 01:15 PM
Default GARS File vb 3.8 vba 3.1

After reading every thread and making the recommended chages, here is the gars.php file to work with the newest of everything (vb 3.8 vba 3.1) in 2009.

Merry Christmas and Happy New Year!

PHP Code:
<?php

        
//SETTINGS

    
$forumids "10";           //      Comma seperated list of forumids
    
$limit 5;                 //      How many items to show
    
$title "News";             //        Module Title
    
$featured 0;              //      1= Only featured items
    
$url_to_default_image "types/3/default.jpg"//Relative URL to default image from geek/gars/images/ folder
    
$vertical 1;              //      1= Vertical (only for template 1 or 3)
    
$preview 1;               //      1= Show preview
    
$ratings 0;               //      1=show ratings
    
$template 2;              //      1=simple with pic, 2=big with pic, 3=Listing no pic
    
$order 1;                 //      0 = rand, 1=desc, 2=asc
    
$maxchars 400;            //  Maximum amount of chards to snip
    
$customfields false;         // Set to true to grab the custom fields.
    
$parsebb true;            //set to true to parse preview

    // END SETTINGS

    
switch ($order)
    {
        case 
0:
                
$order "RAND()"; break;
        case 
1:
                
$order "g.threadid DESC"; break;
        default:
                
$order "g.threadid ASC";
    }
    if (!
$limit)
    {
        
$limit "1";
    }


        
$sql "SELECT g.threadid,g.header_image image, p.title, g.byline, t.forumid, t.dateline, t.postuserid, t.postusername " .
                (
$preview ", IF(g.synopsis, g.synopsis, p.pagetext) synopsis " "") .
                (
$ratings ",round((g.overall_rating/10),0) author_rating, g.overall_rating author_rating_percent,round((g.avg_rating/10),0) member_rating, g.avg_rating member_rating_percent " "" ) .
            
",g.pagecount, g.custom2 " . ($customfields ",gcv.*" "") . " FROM
            " 
TABLE_PREFIX "gars g
            " 
. ($customfields " INNER JOIN " TABLE_PREFIX "gars_custom_values gcv ON gcv.custom_threadid = g.threadid " "") . "
                        INNER JOIN " 
TABLE_PREFIX "thread t ON g.threadid = t.threadid
            INNER JOIN " 
TABLE_PREFIX "post p ON t.firstpostid = p.postid
            WHERE t.visible = 1 AND t.open != 10
            " 
. ($forumids " AND t.forumid in ($forumids) " "" ) . "
            " 
. ($featured " AND g.feature_untill> " TIMENOW "") . "
            ORDER BY $order LIMIT $limit"
;

        
$results $db->query_read($sql);
    
$modulehtml "";
    
$x 0;
    
$bburl $vbulletin->options['bburl'];
    if (
$template==2)
    {
        
$vertical 1;
    }

    
$mods['colspan'] = ($template==$x);
    
$mods['collapse'] = $mods['modid'];
    
$modcollapse $vbcollapse["collapseobj_module_" $mods['modid'] . ""];
    
$modimgcollapse $vbcollapse["collapseimg_module_" $mods['modid'] . ""];

    while (
$result $db->fetch_array($results))
    {

        if (!
$result['image'])
        {
            
$result['image'] = $vbulletin->options['bburl'] . "/geek/gars/images/" $url_to_default_image;
        }
        elseif (
substr($result['image'], 01) == ".")
        {
            
$result['image'] = $vbulletin->options['bburl'] . substr($result['image'], 1);
        }
        else
        {
            
$result['image'] = $result['image'];
        }

        if (
$parsebb && $template!=3)
        {
            
$result['message'] = $bbcode_parser->do_parse($result['synopsis'], 0111);
        }
        else
        {
            
$result['message'] = strip_bbcode($result['synopsis']);
        }

        if (
strlen($result['message']) > $maxchars)
        {
            
$result['message'] = substr($result['message'], 0strrpos(substr($result['message'], 0$maxchars), ' ')) . '...' . ($template!=construct_phrase($vbphrase['read_more'], $vbulletin->options['bburl'], $result['threadid'], $session['sessionurl']) : "");
        }

        
$result['dateposted'] = vbdate($vbulletin->options['dateformat'], $result['dateline']);

        eval(
'$bits = "' fetch_template('adv_portal_gars_bit' $template) . '";');

        if (
$vertical && ($template != 2))
        {
            
$modulehtml .= "<tr>$bits</tr>";
        }
        elseif (
$vertical && $template == 2)
        {
                
$mods['title'] = "<a href=\"$bburl/showthread.php?t=$result[threadid]\">$result[title]</a>";
                
$modulehtml $bits;
                eval(
'$home[$mods[\'modid\']][\'content\'] .= "' fetch_template('adv_portal_module_wrapper') . '";');
        }
        else
        {
            
$modulehtml .= $bits;
            
$x++;
        }


    }
    if (
$modulehtml && ($template != 2))
    {
        if (!
$vertical)
        {
                
$modulehtml "<tr>$modulehtml</tr>";
        }
        
$home[$mods['modid']]['content'] .= $modulehtml;
    }
    elseif (
$modulehtml && $template == 2)
    {
        
$mods['noshell'] = true;
    }


?>
Reply With Quote
  #448  
By tazzarkin on 01-01-2009, 01:24 PM
Default

Quote:
Originally Posted by gothic View Post

The title is lifted from within the gars.php module file (approx line 103)

PHP Code:
$mods['title'] = "<a href=\"$bburl/showthread.php?t=$result[threadid]\">$result[title]</a>"
and is sent to the wrapper.

I would think that the title layout is formatted by the theme/style you're using.

Please don't quote me on that, I could be totally wrong.

UPDATE: just played myself changing the above line to

Code:
$mods['title'] = "<a href=\"$bburl/showthread.php?t=$result[threadid]\"><bold><i>$result[title]</i></bold></a>";
and it worked a treat, adding bold and italic
-----------------------------------

Maybe the 4th best thread. Thank you for this.
Reply With Quote
  #449  
By NoDRaC on 04-05-2009, 10:19 PM
Default

i have another portal system. But i want to ask how can i use gars.php non vb-pages to show resutl?
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
Who wants a GARS module for vBa CMPS? (vB 3.7+) daisukem Geek Article and Review System 4 08-21-2009 10:37 AM
how to make Top 5 Articles block show up on frontpage (vbA CMPS) beowulf68 Geek Article and Review System 1 02-23-2008 11:29 AM
GARS / Links vBA block gothic Geek Article and Review System 1 09-24-2006 11:07 AM
GARS + vBA CMPS SoloX Geek Article and Review System 9 07-15-2006 05:51 AM
Yet Another GARS and vBA CMPS thread... tgreer Geek Article and Review System 20 04-27-2006 08:17 PM


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


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

Release powered by GARS 2.1.9 ©2005-2006