The vB Geek

The vB Geek (http://www.thevbgeek.com/index.php)
-   Tutorials (http://www.thevbgeek.com/forumdisplay.php?f=12)
-   -   Using GAL with vBaCMPS (http://www.thevbgeek.com/showthread.php?t=161)

The Geek 09-15-2005 02:59 PM

Using GAL with vBaCMPS
 
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.

find
PHP Code:

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

Above, add
PHP Code:

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

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

Cool eh? ;)

Fleabag 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 ;)

Fleabag 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 :)

mikecp421 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??

and
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.

HTHs

PixelFX 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.


All times are GMT. The time now is 03:53 PM.

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

Tutorial powered by GARS 2.1.9 ©2005-2006