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-11-2007, 07:13 PM
pipin pipin is offline
Member
 
Join Date: Dec 2006
Posts: 35
Geek Article and Review System License Holder 
Default using a different header for gars (with includes)

I'm just trying to use an alternative header for the gars forum and there should be content of files of the web server in it.

so i'm about to figure out what to do.

plz correct me someone, cause there must be errors in the following:

Plugin with Hook gars_ignition_start named test_gars_include:

Code:
ob_start();
include("/apache/htdocs/data.txt");
$vbulletin->templatecache['gars_header'] = addslashes(ob_get_contents()) . $vbulletin->templatecache['gars_header'];
ob_end_clean();
Template gars_header:

Code:
$test_gars_include
added to Template GARS_forumdisplay:

Code:
<body>
$gars_header
Reply With Quote
  #2  
Old 06-11-2007, 08:23 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

Hi Pipin, you are currently showing up as unlicensed so I can not offer any support.
Reply With Quote
  #3  
Old 06-11-2007, 08:30 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

ok, I just checked my PMs and got the transfer license request to you. Ive activated it now so youre good to go.

To address your question... GARS doesnt use a GARS_header template. It uses your vb header template. For a list of the templates GARS swaps out, check into your template sets.

HTHS!
Reply With Quote
  #4  
Old 06-11-2007, 08:56 PM
pipin pipin is offline
Member
 
Join Date: Dec 2006
Posts: 35
Geek Article and Review System License Holder 
Default

Quote:
Originally Posted by The Geek View Post
ok, I just checked my PMs and got the transfer license request to you. Ive activated it now so youre good to go.

To address your question... GARS doesnt use a GARS_header template. It uses your vb header template. For a list of the templates GARS swaps out, check into your template sets.

HTHS!
i know. the whole thing is about using an alternative header and how to implement it. the thread should be moved to the Add ons and modifications forum.
Reply With Quote
  #5  
Old 06-11-2007, 09:11 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

I think I see what you're trying to do - but it does seem like an odd way of doing it (from my perspective anyway )

Are you trying to totally replace vB's header?

Maybe something more along the lines of this would help:
1- Create the template you want.
2- place a php file in the geek/mods/display folder called header.php with the following contents:
PHP Code:
$vbulletin->templatecache['header'] = $vbulletin->templatecache['gars_header']; 
3- Register it in the GARS module admicp making sure to put the name of your new header template so it gets cached.
4- Add the newly registered module to your module set (anywhere).

That should do what youre after as long as it gets done before vB parses the header template. IIRC, vB pre-parses some templates (i.e. the footer) but I cant remember to be honest

HTHs!
Reply With Quote
  #6  
Old 06-12-2007, 06:00 AM
pipin pipin is offline
Member
 
Join Date: Dec 2006
Posts: 35
Geek Article and Review System License Holder 
Default

that doesnt work, cause it seems nothing is parsed.

it just throws out
PHP Code:
$vbulletin->templatecache['header'] = $vbulletin->templatecache['gars_header']; 
at the selected position of the module.
Reply With Quote
  #7  
Old 06-13-2007, 12:05 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

will you post the entire contents of the module you created?
Reply With Quote
  #8  
Old 06-13-2007, 08:37 PM
pipin pipin is offline
Member
 
Join Date: Dec 2006
Posts: 35
Geek Article and Review System License Holder 
Default

Quote:
Originally Posted by The Geek View Post
will you post the entire contents of the module you created?

Titel: gars_header
Module file: header.php
Comma seperated list of templates to cache: gars_header
Reply With Quote
  #9  
Old 06-15-2007, 05:11 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

I mean the code of the module
Reply With Quote
  #10  
Old 06-15-2007, 05:58 PM
pipin pipin is offline
Member
 
Join Date: Dec 2006
Posts: 35
Geek Article and Review System License Holder 
Default

Quote:
Originally Posted by The Geek View Post
I mean the code of the module
well i just worked it out.

My plugin is called GARS_alternativer_header and uses GARS_ignition_start

PHP Code:
if (THIS_SCRIPT != 'external')
{
        
$header_forum file_get_contents('1.txt');
$header_forum utf8_encode($header_forum);
}

if (
THIS_SCRIPT != 'external')
{
        
$header_news file_get_contents('1.viewh');
        
$header_news utf8_encode($header_news);
}

if (
THIS_SCRIPT != 'external')
{
        
$header_downloads file_get_contents('2.viewh');
$header_downloads utf8_encode($header_downloads);

then i can call the the variables in the template GARS_forumdisplay.

i just need to know where the header of the threaddisplay is created.
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
Warning: Invalid argument supplied for foreach() in /geek/gars/includes/gars..... concepts Geek Article and Review System 3 07-07-2007 07:34 AM
How does GARS handle header images? pixie Geek Article and Review System 2 04-23-2007 07:57 AM
GARS header image from url/Post Award Hack integration Ramses Geek Article and Review System 2 01-11-2006 05:46 PM


All times are GMT. The time now is 12:05 AM.


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