|
Geek Article and Review System GARS is the mega popular system for turning forums into articles, tutorials, or even reviews. |
Advertisement | |
This is an HTML example. Isn't it just wonderful?!?!
|
|
Learn how to remove ads |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Modifying forumview.php and showthread.php for GARS only?
Okay, this is my predicament:
I want to include my right-menu from vBadvanced, but only on the forums where GARS is enabled. To include the right menu, I have to include this piece of code in the corresponding php file: Code:
define('VBA_PORTAL', true); define('VBA_PAGE', 'include'); So my question is obviously, is it possible to alter the GARS code so that it will use modified versions of these files, for instance forumviewGARS.php and showthreadGARS.php? Or perhaps an even easier way to achieve what I'm trying to do? Thanks in advance |
#2
|
||||
|
||||
If I understand correctly, you can try to use the gars_ignition_end hook to see if gars was fired up. If so, then include the define for vba... not sure though as I havent tried
|
#3
|
|||
|
|||
I'm a designer, and not much of a coder unfortunately, so I'm not sure exactly what the statement would look like:
Something like this: Code:
if (defined('gars_ignition_end')) { define('VBA_PORTAL', true); define('VBA_PAGE', 'include'); } Edit: Well that statement I created didn't work, so I guess I'll have to wait for you assistance Please help me, I'm dumb :P Last edited by Lars-Christian; 04-06-2007 at 04:07 PM.. |
#4
|
||||
|
||||
You would do something like this:
Create a plugin to use the gars_ignition_end hook. In it, include the code: PHP Code:
|
#5
|
|||
|
|||
Hmm, doesn't seem like I have that hook in my install of GARS. I only seem to have two hooks, gars_rating_select_start and gars_rating_select_end. Does this have to do with me running 2.1.4, and perhaps this hook wasn't included here?
|
#6
|
||||
|
||||
hmmm... Think so, try updating to 2.1.6 or 2.1.5
|
#7
|
|||
|
|||
Okay, I think I might have found an easier way. And for the reason that I've changed quite a few templates, I can't really upgrade, so I'm looking for another solution.
If I include this in global.php: Code:
if (THIS_SCRIPT == 'gars') { define('VBA_PORTAL', true); define('VBA_PAGE', 'include'); } Last edited by Lars-Christian; 04-06-2007 at 05:48 PM.. |
#8
|
||||
|
||||
That wont work, there is no script called gars.
When global starts up, gars_ignition.php runs to see if it needs to run. If so, $gars or $vbulletin->gars will exist as an object and take over processing the forum/thread as a gars element. |
#9
|
|||
|
|||
Ah, I see, well that makes it sort of a chicken and egg situation, because the definition:
Code:
if (defined('VBA_PORTAL')) { require_once('./includes/vba_cmps_include_template.php'); } |
#10
|
|||
|
|||
You have to check the forumids to see if GARS is going to be loaded before VBAdvanced Include Top.
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
GARS not shown in AdminCP until Admin-User is Superadmin in config.php | Muah | Geek Article and Review System | 10 | 08-21-2010 12:50 PM |
external.php results with gars | dawgbone | Geek Article and Review System | 4 | 11-14-2008 06:11 PM |
PHP Website | Morgan | GARS Link Directory | 0 | 08-24-2008 07:45 PM |
GARS 2.0 RC 2 - gars_class_base.php missing | Marris | Geek Article and Review System | 1 | 07-14-2006 06:55 AM |
Changing from index.php to forum.php? | Michael | Lizard Lounge | 2 | 10-04-2005 03:27 PM |