View Full Version : Using GAL with vBaCMPS

The Geek
09-15-2005, 02:59 PM
GAL has been created in a way that makes it a snap to parse text other than your standard posts.

One popular request for many users is to use GAL on their homepage in the news section of their vBaCMPS.

This teeny tutoiral will show you exactly how easy it is to do that!

Open your forums/modules/news.php for editing.


if (empty($newsforumperms["$news[forumid]"]))

Above, add

$news['message'] = $vbulletin->gal->process_text($news['message']);

Save it and Viola! GAL will now parse your news section.

Cool eh? ;)

09-15-2005, 04:10 PM
Geek you're a mind reader! I was trying to work this out last night. I'll give it a whirl on RC3 when I get home from work. :)

Bad Bunny
09-15-2005, 04:56 PM
Wow. That is indeed very simple!

The Geek
09-15-2005, 04:58 PM
Basically, you can do that with any page that loads global.php

$results = $vbulletin->gal->process_text($text_to_parse);

I thought it was a pretty nifty feature ;)

09-16-2005, 12:18 AM
I'm guessing this can be done using a hook also?

The Geek
09-16-2005, 06:58 AM
sure.,,, anywhere :)

02-02-2006, 06:44 PM
i postyed this on vb.org but I guess its better suited for here. I use the lite for now and had this question

in the GAL manager in this box;

"Ignore threadid (dont autolink this thread)" what do I enter to have every occurence to be linked??

with regards to the ordinal, I know it means "The order of replacement. This is a very important setting as it determines which links will get replaced first. Links are on a first come first serve basis. The lower the ordinal, the more precedence the links have" but what numbner should I have in there if I want every occurence to be linked?

The Geek
02-02-2006, 06:57 PM
You dont need any number in either boxes for every occurence to be linked.

The ignore thread ID will prevent that thread from getting gal'ed by that entry while the ordinal just specifies the order it will get linked.


02-24-2006, 06:43 AM
how would I link this to the vB Journal ? for example?

The Geek
02-24-2006, 07:30 AM
same way. Not sure exactly where the journal text gets parsed (i.e. if there is a hook in there) but essentially you would do the exact same thing.

06-01-2006, 07:14 AM
I'm having a little problem with it on my cmps news section. There are too many spaces before the link now. take a peek http://www.thebluelodge.org

The Geek
06-01-2006, 12:56 PM
You sure that the extra space wasnt there before? Ive never seen it double space like that before. Try it in a couple other news posts.

06-01-2006, 02:54 PM
yup no space there, I just check and it no extra spaces. hmm

The Geek
06-02-2006, 05:59 PM
THere isnt a space in your description or replacement?

03-23-2007, 04:32 AM
so how does this work with the current version? How can I process text in my vbadvanced pages?

...think i missed something somewhere

The Geek
03-23-2007, 07:26 PM
There isnt a specific way to do this with the 5.x series yet as its still in beta.

01-23-2008, 04:28 AM
FWIW the method described in this article does NOT work on VBa CMPS 3.0 RC2, all you will get is a blank page if you try to insert that line into the news.php file.

01-31-2008, 07:48 AM
I've got this error.
How do I fix?

Fatal error: Call to a member function process_text() on a non-object in /home/******/public_html/forums/modules/news.php on line 548

* VB : 3.7.0 B4
* CMPS : 3.0 RC2