The vB Geek

The vB Geek (http://www.thevbgeek.com/index.php)
-   Geek Auto-Linker (http://www.thevbgeek.com/forumdisplay.php?f=27)
-   -   when using with GARS (http://www.thevbgeek.com/showthread.php?t=1602)

benj 06-15-2006 01:20 AM

when using with GARS
 
is there anyway i could just set an articles title to be an autolink the article. because allowing my users to add there own would allow them to take the micky :D plus im lazy and cant be bothered added hundreds of autolinks for articles:D


thanks in advance

The Geek 06-15-2006 07:11 AM

Not currently. Plus that could get pretty difficult as well. I mean, most titles are not just one word - but several. Multiple words sometimes get bothersome :)

Saying that, Ill keep it in mind

benj 06-15-2006 09:04 AM

is there anyway i could limit the autolink they imput to be one autolink or one word without a description

The Geek 06-15-2006 03:04 PM

you could edit geek/gal/includes/gal_class_admin.php and change:

PHP Code:

 function add_keywords_from_gas($keys,$threadid)
    {
         
$keywords  explode(",",$keys);
         
$URL  $this->options['bburl'] . "/showthread.php?t=$threadid";
         foreach (
$keywords as $key)
            {
             
$this->db->query_write("INSERT INTO " TABLE_PREFIX "geek_autolink(text,link,ignorethread) VALUES ('" $this->db->escape_string($key) . "', '" $this->db->escape_string($URL) . "',$threadid)");
         }
         
$this->rebuild();
 } 

to

PHP Code:

 function add_keywords_from_gas($keys,$threadid)
    {
         
$keywords  explode(",",$keys);
         
$URL  $this->options['bburl'] . "/showthread.php?t=$threadid";
            if (
$keywords[0])
            {
             
$this->db->query_write("INSERT INTO " TABLE_PREFIX "geek_autolink(text,link,ignorethread) VALUES ('" $this->db->escape_string($keywords[0]) . "', '" $this->db->escape_string($URL) . "',$threadid)");
          
$this->rebuild();
            }
 } 

That would take only 1 keyword.

HTH's

benj 06-15-2006 07:57 PM

thanks ill try that :D


All times are GMT. The time now is 02:07 AM.

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