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)

webrats 02-14-2005 08:48 PM

i turned on safe mod but its still effecting if someone puts the word in a hyperlink

-=Sniper=- 02-14-2005 08:59 PM

just wondering sorry if its already been asked :)

what if the very first word in the post was the word you want to replace? since it has no space before the word it will not work? well I think not anyway.

The Geek 02-14-2005 09:08 PM

Quote:

Originally Posted by webrats
i turned on safe mod but its still effecting if someone puts the word in a hyperlink

webrats. Can you give me a hyperlink to see?

Sniper: It wont match it in safemode.

-=Sniper=- 02-14-2005 09:25 PM

thanks

just wondering would it not be better to look for "www." and "http"? if the word contains any of those chars then don't replace else replace?

also wondering would it be possible to run two instances of the hack? as I wanted to allow users to turn one instance off.

The Geek 02-14-2005 09:37 PM

Quote:

Originally Posted by -=Sniper=-
thanks

just wondering would it not be better to look for "www." and "http"? if the word contains any of those chars then don't replace else replace?

also wondering would it be possible to run two instances of the hack? as I wanted to allow users to turn one instance off.

Hey sniper, because the www and http would require recursive checks that would be a nightmare performance wise to test. Just because there is a www in front of the word doesnt make it not valid. What would be really cool is to check for the existence of a <a but not a /a pattern. if that equaled true than it would mean you were sitting prettily in a link. Sadly that type of checking is VERY processor intensive. Another way of doing it is to extract all of the URLS, do the replacing and then put all the URLS back in. Once again though... this is pretty labour intensive.

I run in danger mode and have done for 2 years. I could count of the one hand how many links have been messed up in almost 100,000 posts. Still... you have the power of choice to be dangerous or safe (safe mode is slighlty slower as well as there is an extra call to remove insertions to account for spaces).

As far as running 2 versions. This is totally possible however it would require you to make a copy of the install file, change every instance of a setting in use from GAL_* to GAL2_*
You would then have to duplicate the replacements (though this could be optomized with an array merge).
I guess I am saying that yes... it could be done. But it would be a small pain. The good thing is that since the code is so small, it wouldnt require too much work.

Let me know if you attempt it :)

webrats 02-14-2005 10:20 PM

<a href="http://forums.webrats.com/showthread.php?t=24406" target="_blank">http://forums.webrats.com/showthread.php?t=24406</a>

u may have to register to see it im not sure

webrats 02-14-2005 10:35 PM

Quote:

Originally Posted by webrats
http://forums.webrats.com/showthread.php?t=24406

u may have to register to see it im not sure


im clicking the safe mod button in admincp do i have to do anything else? i rebuilt the language files as well

is there sql command i can run to force it?

Kihon Kata 02-15-2005 12:33 AM

I have to say this is one of the best hacks I have ever seen! I just installed it right here on a hacked up vB 3.0.6 forum. Your install script rocked and couldn't have worked any easier! Thanks!

One problem, it doesn't work! LOL :laugh: . Seems like everything is working just fine inside the ACP. I did havetoeditone phrase then save it to be able to see them in thephrasessection.Then I added one word called "reviews". All ofMODS andadmins on theboard frequently use that word and reference toanothersection of oursite and this seemed like the answer! Wi++++ worked! Canyou assist meon a heavily hacked board? I selected SAFE BTW

I did try using http://www. and just /reviews/index.php etc and still nothing.

THanks

FASherman 02-15-2005 02:05 AM

Quote:

Originally Posted by TonysDesigns
I have to say this is one of the best hacks I have ever seen! I just installed it right here on a hacked up vB 3.0.6 forum. Your install script rocked and couldn't have worked any easier! Thanks!

One problem, it doesn't work! LOL :laugh: . Seems like everything is working just fine inside the ACP. I did havetoeditone phrase then save it to be able to see them in thephrasessection.Then I added one word called "reviews". All ofMODS andadmins on theboard frequently use that word and reference toanothersection of oursite and this seemed like the answer! Wi++++ worked! Canyou assist meon a heavily hacked board? I selected SAFE BTW

I did try using http://www. and just /reviews/index.php etc and still nothing.

THanks

I also installed on a heavily hacked forum and it works just fine. Must be a user error.

Kihon Kata 02-15-2005 02:14 AM

Oh man this install was simpler than most. I am still hoping one can lend a hand....


Quote:

Originally Posted by FASherman
I also installed on a heavily hacked forum and it works just fine. Must be a user error.


Kihon Kata 02-15-2005 02:38 AM

NM, I fixed it, my ++++ UP lol

left out one line of the code!



Quote:

Originally Posted by FASherman
I also installed on a heavily hacked forum and it works just fine. Must be a user error.


The Geek 02-15-2005 06:03 AM

Quote:

Originally Posted by webrats
http://forums.webrats.com/showthread.php?t=24406

u may have to register to see it im not sure

Rat - can you PM me test account details?

Can all who install do their bit to save humanity and click the install button? ;)

Symbian.info 02-15-2005 10:06 AM

Quote:

Originally Posted by The Geek
Symbian: How is Safe mode not working? Is that when you get the SQL error? Edit your GAL_admin.php file and search for rebuild_datastore its there that the links are built dpending on your preference to safe or dangerous mode.

Nope still not working! No SQL error, after the setting I get: done. Built with space (and a lot of loving)

But nothing has change :(

Do you have the SQL query for me, so that I can change it manual in the SQL database?
We use a lot of URL's in the forum and they are now all bad.. And not working anymore..

Thanks..

The Geek 02-15-2005 10:10 AM

Quote:

Originally Posted by Symbian.info
Nope still not working! No SQL error, after the setting I get: done. Built with space (and a lot of loving)

But nothing has change :(

Do you have the SQL query for me, so that I can change it manual in the SQL database?
We use a lot of URL's in the forum and they are now all bad.. And not working anymore..

Thanks..

The Datastore is what houses the replacement array.

Can you PM me a test login and the URL of a page with a messed up link? It would be helpful if the account had admin access (though you can restirct the access to everything else).

Ill sort it for you ;)

Kihon Kata 02-15-2005 12:22 PM

**CLicks install**

I was going to click it, but was testing it first.

One issue I am having is this:
I was linking the word MakeupTalk to http://www.makeuptalk.comthat each instance of MakeupTalk is parsed with thathyperlink. BUTsince the word is part of the link, I think thismessed things up.

Also, what about phrases? As in the words review center , it didnt like that either.

Any ideas?



Quote:

Originally Posted by The Geek
@Lionel: Nope

@Rex: Updated the geek_autolink file. It was missing atable_prefix.Could you please click install so you are notified ofchanges?

@trainer: Yup, will totally work without GAS3. And yes, everytimebob,ben or bertha (or whatever you want) appears in a post... it willlinkit to whatever url you want.

HTH's


The Geek 02-15-2005 12:57 PM

Quote:

Originally Posted by TonysDesigns
**CLicks install**

I was going to click it, but was testing it first.

One issue I am having is this:
I was linking the word MakeupTalk to http://www.makeuptalk.comthat each instance of MakeupTalk is parsed with thathyperlink. BUTsince the word is part of the link, I think thismessed things up.

Also, what about phrases? As in the words review center , it didnt like that either.

Any ideas?

It only parses message text. It shouldnt be parsing anything that would require phrases.

Are you using safemode?
I am looking into an issue with symbian where when viewing the thread, existing urls are getting relinked (in safemode) but viewing the post as a single post it comes up fine.
I kind of suspect that the issue could be centered around caching of the post... but am not sure yet. I hope to have a final solution this afternoon.

Kihon Kata 02-15-2005 01:18 PM

Yes the site has it's php in safe mode. My host feels this shouldbe better due to some expliots in php. So, with that said, am I SOL?


Quote:

Originally Posted by The Geek
It only parses message text. It shouldnt be parsing anything that would require phrases.

Are you using safemode?
I am looking into an issue withsymbian where when viewing the thread, existing urls are gettingrelinked (in safemode) but viewing the post as a single post it comesup fine.
I kind of suspect that the issue could be centered around caching ofthe post... but am not sure yet. I hope to have a final solution thisafternoon.


The Geek 02-15-2005 01:38 PM

Quote:

Originally Posted by TonysDesigns
Yes the site has it's php in safe mode. My host feels this shouldbe better due to some expliots in php. So, with that said, am I SOL?

Sorry. I meant running the hack in safe mode. (Geek Autlinker Settings)->safemode ;)

Kihon Kata 02-15-2005 01:41 PM

Play it safe? Yep I have selected this one



Quote:

Originally Posted by The Geek
Sorry. I meant running the hack in safe mode. (Geek Autlinker Settings)->safemode ;)


The Geek 02-15-2005 04:17 PM

Found the bug causing the problems with safemode. Essentially it wasnt letting you build in safemode because of this.

Until I get a few minutes to update the package... do this:

in GAL_admin.php replace
PHP Code:

    if ($leadingspace=-1){ 

with this:

PHP Code:

    if ($leadingspace==-1){ 

Gotta love those =='s ;)

Then click settings and chose Safe. Then you will actually be safe :)

Kihon Kata 02-15-2005 04:20 PM

Oh awesome! Let me fix this and try it

Will report back asap


Quote:

Originally Posted by The Geek
Found the bug causing the problems with safemode.Essentially it wasnt letting you build in safemode because of this.

Until I get a few minutes to update the package... do this:

in GAL_admin.php replace
PHP Code:

    if ($leadingspace=-1){ 

with this:

PHP Code:

    if ($leadingspace==-1){ 

Gotta love those =='s ;)

Then click settings and chose Safe. Then you will actually be safe :)


-=Sniper=- 02-15-2005 04:42 PM

that makes it work! thanks dude :)

Kihon Kata 02-15-2005 04:44 PM

Ahhhh, when I made this change it removed only SOME OF MY LINKS. I hit safe too

Some of the ones I added before are working and some aren't now. I evendeleted some and then readded them and they don't work anymore

Do I have recompile something?




Quote:

Originally Posted by TonysDesigns
Oh awesome! Let me fix this and try it

Will report back asap


Symbian.info 02-15-2005 05:00 PM

Quote:

Originally Posted by The Geek
Found the bug causing the problems with safemode. Essentially it wasnt letting you build in safemode because of this.

Awesome it works now! I was a good geinny pig :laugh:
Thanks for all the work! I am very happy now :smoke:

Kihon Kata 02-15-2005 05:02 PM

Ok, not working for me. This is what I did

I added the = like you had said inside GAL_admin.php. What this did wasremove half of my links LOL. I know....half?? But it really did. If Iremove the = and then hit SAFEMODE, it recompiles itright back to whereit was working with some words

Are there more instance of
PHP Code:

if ($leadingspace=-1){ 

other than just the ONE I found?

Quote:

Originally Posted by The Geek
Found the bug causing the problems withsafemode.Essentially it wasnt letting you build in safemode because ofthis.

Until I get a few minutes to update the package... do this:

in GAL_admin.php replace
PHP Code:

    if ($leadingspace=-1){ 

with this:

PHP Code:

    if ($leadingspace==-1){ 

Gotta love those =='s ;)

Then click settings and chose Safe. Then you will actually be safe :)


The Geek 02-15-2005 05:23 PM

if ($leadingspace=-1){

there should only be 1 line like that and it needs to be changed to

if ($leadingspace==-1){

Kihon Kata 02-15-2005 05:33 PM

See the attachment

Litterally, if I edit the php file to be the exact code in the attachtext file, and then upload it. Then go into the ACP, hit "Safe mode" itremoves half my links thatare there working BEFORE I edit/upload. I have duplicated process this 5 times.

What am I doing wrong?




Quote:

Originally Posted by The Geek
if ($leadingspace=-1){

there should only be 1 line like that and it needs to be changed to

if ($leadingspace==-1){


The Geek 02-15-2005 06:00 PM

Quote:

Originally Posted by TonysDesigns
See the attachment

Litterally, if I edit the php file to be the exact code in the attachtext file, and then upload it. Then go into the ACP, hit "Safe mode" itremoves half my links thatare there working BEFORE I edit/upload. I have duplicated process this 5 times.

What am I doing wrong?

I assume these are links that were put in bu the GAL system? If so it is because in safe mode, there will only be a match for a word if the word has a space in front of it.
Before you made the file edit, it was working in dangerous mode (even though you chose safe) which meant it couldnt give a poo about the space in front.
Safemode=fewer links, but less chance of URL screw up
Dangerous=More links, but greater risk of flub up

Hope this makes sense.

Kihon Kata 02-15-2005 06:05 PM

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




Quote:

Originally Posted by The Geek
I assume these are links that were put in bu the GALsystem? If so it is because in safe mode, there will only be a matchfor a word if the word has a space in front of it.
Before you made the file edit, it was working in dangerous mode (eventhough you chose safe) which meant it couldnt give a poo about thespace in front.
Safemode=fewer links, but less chance of URL screw up
Dangerous=More links, but greater risk of flub up

Hope this makes sense.


Kihon Kata 02-15-2005 06:10 PM

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



Quote:

Originally Posted by The Geek
I assume these are links that were put in bu the GALsystem? If so it is because in safe mode, there will only be a matchfor a word if the word has a space in front of it.
Before you made the file edit, it was working in dangerous mode (eventhough you chose safe) which meant it couldnt give a poo about thespace in front.
Safemode=fewer links, but less chance of URL screw up
Dangerous=More links, but greater risk of flub up

Hope this makes sense.


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 02:33 AM.

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.02033 seconds
  • Memory Usage 1,907KB
  • 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
  • (14)bbcode_php_printable
  • (29)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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