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-09-2005 10:00 PM

Geek AutoLinker 4.02
 
HowdA All,

Welcome to Geek Autolinker 4.0 from the makers of Geek Autolinker 2.0 and Tang - the stuff the people in space drink.

posts for version 4.0 start here

What it does:
It allows you to specify key words to replace in posts with ANY FREAKING URL YOU COULD THINK OF. Thats right, you to can now have key words automatically url'ed to other areas of the world wide web.

Now in 4.0 you can create popups, track impressions and click-thrus, get statistics on them and specify more attributes of the links. The popups can now also use bbcode to create virtually any kind of popup you could imagine. You can limit categories of links to certain forums and also enable specific usergroups to toggle GALs on or off (by category).


This is a perfect gift for sponsors, click throughs, referal programs, definitions, instructions, birthdays and other celebrations.

Example:
If I define Bob as a keyword that I would like to automatically come up hyperlinked to bob.com all I have to do is say so (well, you put it into the admincp). Presto! As quick as that, everytime a user sees the word bob, bobs, bob! Bob bOb? etc... it comes up linked to bob.com

How much will bob love you?

If the url you want it to jump to is actually a thread on your site, you can use the nifty ignorethreadid option. Heres how that works:

If I have a thread entitled Reputation and how to use it, I can put the word reputation into the Geek AutoLinker with the URL pointing to the thread about reputation. Then everytime the word reputation appears in someones post, anyone can click on it to learn more. Since it would be stupid to have the thread Reputation and how to use it autolink to itself, I put the threadid in the ignorethreadid box. That way all matches for reputation are linked to that thread except for the reputation matches in the thread Reputation and how to use it.

Safe mode and dangerous mode.

There are now two modes of operation. Safe mode will autolink any match AS LONG AS IT HAS A SPACE BEFORE IT. That means that <br />bob or .Bob are not valid matches and wont be highlighted. The reason for this is to prevent the autolinker messing up URLs with matches in them (like www.bob.com). Safe mode will most likely end up with fewer matches, but no messed up URLS.
Dangerous mode however could care less about your cute little spaces. It will link them regardless. That means more matches, but a slight increase that an existing url might break in a post.

Here are some examples in action.
Keyword: freak

Safe mode.
Freak out whenever freaks freak about on www.freak.com
Dangerous mode:
Freak out whenever freaks freak about on www.<a href="www.freak.com">freak</a>.com

Other stuff:
  • Category management - allows you to override global settings
  • Limit - limit the number of replacements per link per post
  • Ordinal - organise the order replacments are made
  • Customize your own replacment code on a global, catergory, or individual level.
  • The installer is a prototype GISH installer that does the file edits for you. Please check the readme for details on how it works - its pretty cool).
Upgrading
  • Download, replace all existing files with new ones.
  • Run the gal4_install.php file (in your admincp)
  • Follow the upgrade path.
  • The system will ahve you manullay chage any files it can not find to update.
DEMO: http://www.thenailgeek.com/showthread.php?t=11011 (note the words MMA and PREP. If you follow to MMA you will notice that MMA isnt linked in the final article thanks to ignorethreadid)

Difficulty: Easy
File mods: 4 simple ones
Added queries: 0 or greater depending on your settings

Updated 10.5.05 - Major
Massive update in functionality

Updated 13.4.05 - Major
Massive update in functionality

Update 25.03.05 - oops!
Changed readme addition to functions_showthread.php Things look good now :)

Updates 25.05.05 to v.204 - sneaky bug
Thanks to Razz - I found 2 minor typos that end up causing people working in safemode to actually be working in danger mode! To upgrade, simply check out this post

Updated 12.2.05 to v. 2.03 - ultra minor
Fixed a typo in readme. To upgrade, al you need to do is edit admincp/index,
do a search for
construct_nav_option($vbphrase['GAL_add_new'], 'GAL_admin.php?do=create');
and replace with
construct_nav_option($vbphrase['GAL_add_new'], 'GAL_admin.php?do=add');

Updated 11.2.05 - ultra minor
Fixed a typo in README (dont worry, it wasnt in the instructions)
Stopped phrase text spitting out during install. Some of the phrase is html so it looked confusing to new installers.
Removed reference to GAS3 settings in the install. This is because its the same installer. Just forgot to remove that line.
All in all, this was just a typo fix. There is no upgrade because there are no problems with the code.

Updated 10.2.05 - minor
Found a couple typos that affect safe mode.
Nothing major - just replace the GAL_admin.php file

Updated 10.2.05 - Major
Completely re-written.
See README for upgrade instructions.

Update 10.2.05 - minor
Updated include/geek_autolink.php as it was missing a table_prefix
To upgrade, download latest package and replace your geek_autolink file.


nJoy

yoyoyoyo 02-09-2005 10:27 PM

very cool- kinda like a wikipedia :)

nexialys 02-09-2005 10:29 PM

for your links related thing: https://vborg.vbsupport.ru/showthread.php?t=69077

The Geek 02-09-2005 10:38 PM

Quote:

Originally Posted by nexialys

Thanks nexialys, though I think that is a little different than the control I want.
I run a professional nail site (could you guess). If someone types in What is MMA? in a post, I want MMA to automatically link to a Geek Article on site. What I dont want is that article (or thread) to automatically highlight all instances of MMA which would simply refer back to itself (if you know what I mean!). Thats what the ignorethreadid is for ;)

nexialys 02-09-2005 10:41 PM

no, i was relating to the fact that if users quote a url in a thread that is related to another thread or forum in your board, it would display that thread or forum title, ... maybe this can be added as a feature on your system.

noppid 02-09-2005 10:59 PM

Quote:

Have never found a way around this (maybe someone here can help). If you are replacing bob with www.bob.com and somone puts in a link to www.hithere.com/I_am_bob.html it will screw up their link.
When the user posts the word they want parsed, save it as...

PHP Code:

$word " " $word " "

So when it's retrieved it's parsed as Space bob Space.

Maybe you tried that? Just a thought.

KTBleeding 02-09-2005 11:02 PM

Oohh, you know what would be cool TNG?

When creating an article in the Geek Article System, it will automatically add the article name/url into an auto linker system like this. That would be awesome. hah.

The Geek 02-09-2005 11:08 PM

Quote:

Originally Posted by KTBleeding
in the Geek Article System, it will automatically add the article name/url into an auto linker system like this.

Theres an idea! Ill mull that one over for awhile.

noppid: The idea is that keywords are highlighted without them even knowing about it. Otherwise the previous suggestion would be the perfect hack.

Say you have eBay as a sponsor. Well, everytime eBay is mentioned- it will link it automatically.

Hope that makes sense.
I am mulling over adding a post field to disable it (like disabling smiles). That way if a user notices a link of theirs messed up (or knows ahead of time that it will get messed up) they can simply tick the 'do not autolink me'. Im only hesitant because I hate making DB changes to vB db's.

noppid 02-09-2005 11:25 PM

I phrased that wrong.

In the ACP code before the insert of $replace on action create, add the spaces at both ends of $replace. This way later when it's called to be looked for in a post to do a replacement, you are looking for Space bob Space instead of just bob which can be embedded in words.

"bob" can be found embedded in words.

" bob " is a stand alone bob.

The Geek 02-09-2005 11:31 PM

Quote:

Originally Posted by noppid
I phrased that wrong.

In the ACP code before the insert of $replace on action create, add the spaces at both ends of $replace. This way later when it's called to be looked for in a post to do a replacement, you are looking for Space bob Space instead of just bob which can be embedded in words.

"bob" can be found embedded in words.

" bob " is a stand alone bob.

ah... gotcha. I used to do that. It works... but the trade off is that the following doesnt get picked up with a trailing space:
bobs
bob.
bob!
bob?
etc...

The leading space is the best 2nd option. Where that fails is:
Bob at the start of a paragraph
or .Bob at the start of a sentence with no space (or other mark like ").

So, it is a bit of a trade off. If you want less likely to screw up links... add the spaces (I would add only one space). However in over 2 years of using this... I have only had about 3 screwed up links. Saying that... it could be more for sponsored links. Take eBay for example. You can autolink all ebays, however any user linking to www.ebay.com would have their link broken.

Maybe an option is in order!

What do you guys think? Option to turn on leading space? Personally, I would opt out of training space becasue of punctuation issues.

noppid 02-09-2005 11:44 PM

I see your point. Too much code would be a bad thing. Compromise is good.

Nice hack.

Lionel 02-10-2005 12:36 AM

Isnt it the same thing accomplished now with replacements variables?

rex_b 02-10-2005 01:42 AM

I'm getting errors b/c my prefixes are not default vb prefix, I have changed them. Could you make the hack work without having default named vb prefixed.

trainer 02-10-2005 02:32 AM

will this work without adding the geek article hack?

so every time bob is posted in a thread or has been posted in a thread it will link to whatever url we want?

The Geek 02-10-2005 06:26 AM

Quote:

Originally Posted by Lionel
Isnt it the same thing accomplished now with replacements variables?

@Lionel: Nope

@Rex: Updated the geek_autolink file. It was missing a table_prefix. Could you please click install so you are notified of changes?

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

HTH's

OrangeFlea 02-10-2005 08:32 AM

So basically, the admin or the owner of the forum would have to input the individual URLs for all the corresponding words he/she wants hyperlinked? For example, on a video game message board, you could have words like "Mario" or "Halo" become actual links to Nintendo.com or Bungie.com?

I've seen this feature executed before and I was wondering if there was a master list available for Amazon.com keywords, to save me the trouble of manually hyperlinking every book title.

The Geek 02-10-2005 09:19 AM

Quote:

Originally Posted by OrangeFlea
So basically, the admin or the owner of the forum would have to input the individual URLs for all the corresponding words he/she wants hyperlinked? For example, on a video game message board, you could have words like "Mario" or "Halo" become actual links to Nintendo.com or Bungie.com?

I've seen this feature executed before and I was wondering if there was a master list available for Amazon.com keywords, to save me the trouble of manually hyperlinking every book title.

Thats correct.

I dont know of any master list, though it is quite a cool idea ;)
Doesnt Amazon use refererids? If that was the case, a master list might not work (unless you didnt care about thre refererid).

OrangeFlea 02-10-2005 10:00 AM

Another question, does the feature work in retrospect? Meaning, will it convert all targeted words even those made prior to the hack's installation, or will it only apply to subsequent entries?

The Geek 02-10-2005 11:33 AM

Quote:

Originally Posted by OrangeFlea
Another question, does the feature work in retrospect? Meaning, will it convert all targeted words even those made prior to the hack's installation, or will it only apply to subsequent entries?

It works on all posts regardless of if they were posted before or after the hack as the links are made at the time of viewing the thread (woo-hoo dynamic!). For instance, adding 'fred' in the sytem will instantly makes all occurences of fred in posts hyperlinked, Have a fall out with Fred and dont like him hyperlinked? Take fred out of the system and he wont appear hyperlinked anymore.

Cool eh?!

Ghostsuit 02-10-2005 12:39 PM

Really nice hack. I notice you say it add's one queries is that no matter how many links are checked?

The Geek 02-10-2005 01:32 PM

Quote:

Originally Posted by Ghostsuit
Really nice hack. I notice you say it add's one queries is that no matter how many links are checked?

Yeas ghostsuit. It pulls all of the replacements in one go and then does one replacementcall using an array of the data from the one pull

Thanks ;)

OrangeFlea 02-10-2005 01:44 PM

About using the amazon.com referall program in association with this hack...

I have an amazon.com search thing on my forum, and when members use it to look for a book or a product, naturally I get the credit for it. However, I've also noticed -- and I don't know if this is FACT -- that when members browse amazon.com after making the initial search, they're still browsing under the referral system, as long as they don't reload Amazon.com or close their browser. Based on this theory, wouldn't it make sense, when using your hack, to hyperlink words with the URLs that have your referall id in them?

Am I making any sense?

ericgtr 02-10-2005 01:51 PM

This works great! I like how you've avoided anything to do with functions_bbcodeparse :D Installed!

The Geek 02-10-2005 02:06 PM

Quote:

Originally Posted by OrangeFlea
About using the amazon.com referall program in association with this hack...

I have an amazon.com search thing on my forum, and when members use it to look for a book or a product, naturally I get the credit for it. However, I've also noticed -- and I don't know if this is FACT -- that when members browse amazon.com after making the initial search, they're still browsing under the referral system, as long as they don't reload Amazon.com or close their browser. Based on this theory, wouldn't it make sense, when using your hack, to hyperlink words with the URLs that have your referall id in them?

Am I making any sense?

Yup. Thats what I mean about a master listing. If there was a master listing of say Amazon book names with matching URL's (including a referal ID) then you would still have to edit them to put in YOUR referal ID.

In a nutshell, this hack will do exactly what you are trying to do. Everytime someone types in the joy of sex it will hyperlink it to the joy of sex at amazon.com with your referal id.

Hope that makse sense!

erictr-> Thanks man :)

OrangeFlea 02-10-2005 02:12 PM

Forgive me, my man. I forgot to congratulate you on this remarkable hack. It's a wonderful and helpful tool you've made and provided for us, Sir Geek. I'll be looking forward to seeing your future releases!

The Geek 02-10-2005 02:15 PM

Quote:

Originally Posted by OrangeFlea
congratulate you on this remarkable hack. It's a wonderful and helpful tool you've made and provided for us,

Anytime Sir Flea ;)

Just do me a favour and toggle the ol install switch if you use it :)
(I may have something cool on the way)

Ghostsuit 02-10-2005 03:58 PM

Installed. I have to say I'm finding far to many of your hacks jsut exactly what I need :D

trainer 02-10-2005 04:04 PM

will this hurt a larger site? slow it down?

The Geek 02-10-2005 04:08 PM

Quote:

Originally Posted by trainer
will this hurt a larger site? slow it down?

not really. I would say that it more depends on the #of replacements you had.
Obviously replacing 5 keywords is a lot faster than replacing 1000 keywords.

The Geek 02-10-2005 04:12 PM

I know everyones going to kill me... but I am just putting the finishing touches on an upgraded version that is substantially faster (not that this is slow by any means) and eliminates the query, include file,the array walks, and the inline replacments. I have re-coded it to build these up in the admincp when ammendments are made. It then stores it in the datastore.

I am also putting in the option to add an additional leading space to eliminate breaking existing URLs. The flip side to this is that the key word must have a space infront of it to be a match.

Ill post more when I have the update.

Give me an hour (PS- the upgrading process should be a snap so dont anyone get fidgety with me ;) )

OrangeFlea 02-10-2005 05:21 PM

I was wondering (hey, they don't call me flea for nothing...)

- Will the links open a new browser window or will they not? (Is there an option to change this?)

Revan 02-10-2005 05:43 PM

Quote:

Originally Posted by GAL Installer
However sometimes the phrases will not appear until you edit one of the new phrases and save it (dont ask me why).<br />If after you have finished the installation, you dont see any phrases, search for phrase GAL_ ... edit it and then save it.

Or you could just run
PHP Code:

build_language(); 

after the phrase insert ;)

You see me not having install clicked because well I didn't install it :p
I just heard about this from a mate and checked out the install script.


//peace

ericgtr 02-10-2005 05:55 PM

Quote:

Originally Posted by OrangeFlea
I was wondering (hey, they don't call me flea for nothing...)

- Will the links open a new browser window or will they not? (Is there an option to change this?)

Yes, they open in a new window, it appears to act as if a link was simply posted in the thread. There is no configuration to keep it in the same window although you could probably add a _self somewhere if you wanted.

The Geek 02-10-2005 05:59 PM

Quote:

Originally Posted by OrangeFlea
I was wondering (hey, they don't call me flea for nothing...)

- Will the links open a new browser window or will they not? (Is there an option to change this?)

yup, Links open in new window.

Revan-> I do call build_language (several times for good measure ;) )

Revan 02-10-2005 06:14 PM

Yea so you do.
But you always rebuild the master language, and unless your phrases are meant to disappear after a vB upgrade, I would suggest you insert them in whatever language is default.
Calling build_language on the language you inserted the phrases in (or without an argument at all) WILL eliminate the need for such an "edit 'n' save", but if your script behaves otherwise then there's a bug :p

The Geek 02-10-2005 06:16 PM

Quote:

Originally Posted by Revan
Yea so you do.
But you always rebuild the master language, and unless your phrases are meant to disappear after a vB upgrade, I would suggest you insert them in whatever language is default.
Calling build_language on the language you inserted the phrases in (or without an argument at all) WILL eliminate the need for such an "edit 'n' save", but if your script behaves otherwise then there's a bug :p

ah right. I used to insert into languageid 0, then I was told to do -1.

What ID should I use and do I pass the ID along with the build_language()?

I would LOVE to sort this out. Its a serious butt pain!

(sorry for going off topic... Im just greedy :) )

Revan 02-10-2005 07:25 PM

Well for my RPG hack Im gonna just parse an XML file of phrases... I guess that imports into the default language.
I always call build_language() without arguments, because I quite frankly have no idea what language its inserting into (or I can't remember), and in an installer that runs 650+ queries already, whatever takes to rebuild all languages is neglible.

I spose there's a $vboptions for what language is the default, try pissin about in the acp for it.

//peace

The Geek 02-10-2005 08:11 PM

Updated package to 2.0.


Major release. Upgrade instructions in README (takes about 5 minutes). Loads of improvements (see first thread).

nJoy

KTBleeding 02-10-2005 08:19 PM

Quote:

If I have a thread entitled Reputation and how to use it, I can put the word reputation into the Geek AutoLinker with the URL pointing to the thread about reputation. Then everytime the word reputation appears in someones post, anyone can click on it to learn more. Since it would be stupid to have the thread Reputation and how to use it autolink to itself, I put the threadid in the ignorethreadid box. That way all matches for reputation are linked to that thread except for the reputation matches in the thread Reputation and how to use it.
That sounds awesome!! Once I get vBaGallery figured out, I'll give this install a whirl too.

The Geek 02-10-2005 08:54 PM

Quote:

Originally Posted by Revan
Well for my RPG hack Im gonna just parse an XML file of phrases... I guess that imports into the default language.
I always call build_language() without arguments, because I quite frankly have no idea what language its inserting into (or I can't remember), and in an installer that runs 650+ queries already, whatever takes to rebuild all languages is neglible.

I spose there's a $vboptions for what language is the default, try pissin about in the acp for it.


//peace

Thanks Revan - calling build_language() is the same as build_language(-1).

Still... cant seem to figure out why sometimes phrases install fine and sometimes they need the edit/save workaround. Wish it was better documented.

O well... not too big of a deal as its only occasional and if a user does run into the problem, there is a one off workaround.

Thanks for looking into it for me.


All times are GMT. The time now is 04:49 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.02318 seconds
  • Memory Usage 1,866KB
  • 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
  • (2)bbcode_php_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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