vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Geek AutoLinker 4.02 (https://vborg.vbsupport.ru/showthread.php?t=76054)

The Geek 02-15-2005 06:18 PM

Quote:

Originally Posted by TonysDesigns
Yep it makes sense
Yes I am talking about the links thru the GAL sys.

EG Word usage: reviews (linked to http://www.makeuptalk.com/reviews)
This works FINE before I uploaded the modded file.

But why does it REMOVE links when I hit safe mode? I start a new thread with one word in it reviews with no spaces etc. Could this be that it's in the beginning of the sentence?

Hmm seems strange...but ok, let me fool with dangerous mode now...

Yea... no space if it is the first word.

However, you could try this workaround (havent done it myself but it would make sense:

in functions_showtherad.php replace:
PHP Code:

        if ($gal_autotext){

            
$post['message']=preg_replace($gal_autotext,$gal_autolink,$post['message']);

            if (
$gal_setting['leading_space']==1){
                
$post['message']=preg_replace("<!--GAL_REMOVAL--> ","",$post['message']);
            }
        } 

with:

PHP Code:

        if ($gal_autotext){
$post['message']=' ' $post['message'];
            
$post['message']=preg_replace($gal_autotext,$gal_autolink,$post['message']);

            if (
$gal_setting['leading_space']==1){
                
$post['message']=preg_replace("<!--GAL_REMOVAL--> ","",$post['message']);
            }
$post['message']=trim($post['message']);
        } 

That would put a space before the message, replace... then trim the extra space back out.

Like I said - havent done it here but it should work.

OrangeFlea 02-15-2005 07:48 PM

I've noticed that single-word entries supercede multi-word entries. For example, when I input "Toyota" and "Toyota Celica," the hack will only hyperlink "Toyota" in those instances where "Toyota" is part of a multi-word keyword. Like this...

Toyota
Toyota Celica
Toyota Landcruiser

Celica and Landcruiser are left out, even if I did input them in as part of the phrase.

The Geek 02-15-2005 07:55 PM

Quote:

Originally Posted by OrangeFlea
I've noticed that single-word entries supercede multi-word entries. For example, when I input "Toyota" and "Toyota Celica," the hack will only hyperlink "Toyota" in those instances where "Toyota" is part of a multi-word keyword. Like this...

Toyota
Toyota Celica
Toyota Landcruiser

Celica and Landcruiser are left out, even if I did input them in as part of the phrase.

huh. Maybe an 'ordinal' value is needed. As a fix, you can try this:

In GAL_admin.php replace
PHP Code:

$results=$DB_site->query("SELECT * FROM " TABLE_PREFIX "geek_autolink ORDER BY text asc"); 

with

PHP Code:

$results=$DB_site->query("SELECT * FROM " TABLE_PREFIX "geek_autolink ORDER BY id asc"); 

This should cause the text to replace in the order it was put into the system. Ill look toward adding an ordinal column.

Kihon Kata 02-15-2005 08:47 PM

BYW, YOUR REPLY here FIXED this:

when I added a two word combo as review center I get this: reviews' target='_blank' class='DEF' title=''>review center

Dangerous Selected!



Quote:

Originally Posted by The Geek
huh. Maybe an 'ordinal' value is needed. As a fix, you can try this:

In GAL_admin.php replace
PHP Code:

$results=$DB_site->query("SELECT * FROM " TABLE_PREFIX "geek_autolink ORDER BY text asc"); 

with

PHP Code:

$results=$DB_site->query("SELECT * FROM " TABLE_PREFIX "geek_autolink ORDER BY id asc"); 

This should cause the text to replace in the order it was put into the system. Ill look toward adding an ordinal column.


The Geek 02-15-2005 08:58 PM

Thats because it linked review, then linked review center.
If you were in safemode, only review would ever get linked. In dangerous mode, IF review was replaced first then review center would mess it up.

Hope this makes sense!

Kihon Kata 02-15-2005 09:09 PM

Little bit deep for me, BUT nevertheless, seems to be working

Look here at this post for an example of it working right. This is a nice hack



Quote:

Originally Posted by The Geek
Thats because it linked review, then linked review center.
Ifyou were in safemode, only review would ever get linked. In dangerousmode, IF review was replaced first then review center would mess it up.

Hope this makes sense!


Symbian.info 02-15-2005 09:41 PM

Quote:

Originally Posted by The Geek
h
with
PHP Code:

$results=$DB_site->query("SELECT * FROM " TABLE_PREFIX "geek_autolink ORDER BY id asc"); 


Great that works. Thanks again!!

slix 02-19-2005 03:56 AM

Hey Mr. Geek, I have been looking for this feature for a while. So I am well chuffed with it. Ta! I clicked install for you.

A couple of questions....

1. Is there a way to change the style of links produced from this mod from the default link style? I would like to make them bold :)

2. If I add a the same keyword twice, and put a different link with each one, will it randomize between the 2 link destinations?

3. Does it only work wioth single words, or will it work with phrases to? For example, "bob music".


Just a couple of suggestions....

1. It might be better if the admin could enter one URL, and a list of keywords & phrases (seperated by commers) to trigger that link.

2. Forgot it.... dam! :smoke:

The Geek 02-19-2005 04:31 AM

Quote:

Originally Posted by slix
Hey Mr. Geek, I have been looking for this feature for a while. So I am well chuffed with it. Ta! I clicked install for you.

A couple of questions....

1. Is there a way to change the style of links produced from this mod from the default link style? I would like to make them bold :)

2. If I add a the same keyword twice, and put a different link with each one, will it randomize between the 2 link destinations?

3. Does it only work wioth single words, or will it work with phrases to? For example, "bob music".


Just a couple of suggestions....

1. It might be better if the admin could enter one URL, and a list of keywords & phrases (seperated by commers) to trigger that link.

2. Forgot it.... dam! :smoke:

Hey Slix,

Glad it helps.
1. To change the look of the links - try changing the DEFS CSS markup that came with the file. Otherwise, you will need to edit your GAL_admin.php file as that is where links are made

2. It wont randomize (think that would drive users ape poop ;) ). The replacement is a first come first server basis.

3. Works with whatever phrase you want, no matter how many spaces it contains (Though there is a limit on the phrase character length but that escapes me right now!)

I like your suggestion. Ill look into it when I revisit this hack (when I am done with GAS3)

Toodles

Kihon Kata 02-19-2005 04:36 AM

Slix! This is one of the most USEFUL hacks I have seen yet! We love it on our board here

I was a little tricky to get it to work and the installation script is well written KUDOS!!!

lata


Quote:

Originally Posted by slix
Hey Mr. Geek, I have been looking for this feature for awhile. So I am well chuffed with it. Ta! I clicked install for you.

A couple of questions....

1. Is there a way to change the style of links produced from this modfrom the default link style? I would like to make them bold :)

2. If I add a the same keyword twice, and put a different link with each one, will it randomize between the 2 link destinations?

3. Does it only work wioth single words, or will it work with phrases to? For example, "bob music".


Just a couple of suggestions....

1. It might be better if the admin could enter one URL, and a list ofkeywords & phrases (seperated by commers) to trigger that link.

2. Forgot it.... dam! :smoke:



All times are GMT. The time now is 08:58 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01749 seconds
  • Memory Usage 1,778KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete