vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Mini Mods - vBaffiliate Links (https://vborg.vbsupport.ru/showthread.php?t=176355)

nfn 04-15-2008 10:00 PM

vBaffiliate Links
 
Description:

This modification will replace a list of words with a list of words/links you define.
I use it to create links to affiliate programs using words from the posts, but can be used as a simple text replacement.

Tested With:
  • vBulletin 3.6.9
  • vBulletin 3.7.0 RC 3
Changes:
  • [v1.1.0]
    • Added vBadvanced News module support
    • Option for case sensitive
    • Option for removing space before & after
    • Link mask for link replacement
    • Can be used as a simple text replacement (without Link mask)
    • Code simplification for expanding propose
  • [v1.0.1] Issue with vB 3.7.0 RC3
  • [v1.0.0] First Release.
Installation & Upgrade Instructions:

Upload the product & configure the settings for the product vBaffiliate Links.

Notes:

This doesn't work with highlight text when searching yet ...
[s]The replacement is case sensitive.
The replacement process will only replace word between spaces.[/s]
From v1.1.x you can use the Link mask as a standard way to define your links.
This mod will only work with PHP5.
If someone would like to help, the credit will be given and I'll appreciate.

How to Use:

Without Link Mask:

Place one word per line in the first box and one word/link per line in the second box.

Word to Replace:
vBulletin Oficial Site
vBorg
Simple Text

Link to Replace:
<a href="http://www.vbulletin.com" title="vBulletin Official Site">vBulletin Oficial Site</a>
<a href="http://www.vbulletin.org" title="vBulletin Modification Site">vBorg</a>
<strong>Simple Text</strong>

With Link Mask:

Define the Link mask you want to use:

<a href="{link}" title="Advertisement">{word}</a>
{link} and {word} will be replaced with each par.

Place one word per line in the first box and one word/link per line in the second box.

Word to Replace:
vBulletin Oficial Site
vBorg

Link to Replace:
http://www.vbulletin.com
http://www.vbulletin.org



nfn 04-16-2008 06:15 PM

Reserved...

SEOvB 04-16-2008 06:23 PM

Nice job.

Doesnt the built in replacement variables do the same, or will this only replace words in posts?

nfn 04-16-2008 06:32 PM

Thanks,

This doesn't replace words permanently. It replaces words on the fly, so if you want to create links they will be removed when you remove this mod.

gwerzal 04-16-2008 09:47 PM

This is pretty cool.

Im gonna have a little play with this.

Cheers dude

gwerzal 04-16-2008 09:55 PM

Doesn't seem to be making any changes.

ecrotty 04-16-2008 11:39 PM

im really excited for this one, but it doesnt seem to be working. 3.7RC3 here.

going to try a few other things in case im not doing it right...

so far i have :

to be replaced :
Amazon

replace with :
<a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.am azon.com%2F&tag=zoolertcom-20&linkCode=ur2&camp=1789&creative=9325">Amazon</a>

And my post has just the word :

Amazon

with carriage returns and all :(

Any thoughts?

toucan42 04-17-2008 12:10 AM

Interesting idea - tagged to watch it.

SEOvB 04-17-2008 12:28 AM

Quote:

Originally Posted by ecrotty (Post 1492563)
im really excited for this one, but it doesnt seem to be working. 3.7RC3 here.

going to try a few other things in case im not doing it right...

so far i have :

to be replaced :
Amazon

replace with :
<a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.am azon.com%2F&tag=zoolertcom-20&linkCode=ur2&camp=1789&creative=9325">Amazon</a>

And my post has just the word :

Amazon

with carriage returns and all :(

Any thoughts?

Just use the replacement variables in the style manager and see if that works, it should.

nfn 04-17-2008 08:43 AM

Hi,

Sorry for my mistake.
Now It's working!
Thanks.


Quote:

Originally Posted by ecrotty (Post 1492563)
im really excited for this one, but it doesnt seem to be working. 3.7RC3 here.

going to try a few other things in case im not doing it right...

so far i have :

to be replaced :
Amazon

replace with :
<a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.am azon.com%2F&tag=zoolertcom-20&linkCode=ur2&camp=1789&creative=9325">Amazon</a>

And my post has just the word :

Amazon

with carriage returns and all :(

Any thoughts?


fulviods 04-17-2008 11:06 AM

I used some years ago but dont remember if it was on phpbb or in vbulletin, a word link system with those functionalities:

- set up the words that should be transformed in links
- activate or not a description (a little box/cloud appear when you mouseover the link, with the description and the link)
- statistics: you know how many views and clicks for each keyword
- ad solution: you can choose a period or a number of click maximum for each word then the link become a normal word again.

Someone knows if this solution exist for a vb 3.7 ? Thanks

nfn 04-17-2008 11:27 AM

Quote:

Originally Posted by fulviods (Post 1492865)
I used some years ago but dont remember if it was on phpbb or in vbulletin, a word link system with those functionalities:

- set up the words that should be transformed in links
- activate or not a description (a little box/cloud appear when you mouseover the link, with the description and the link)
- statistics: you know how many views and clicks for each keyword
- ad solution: you can choose a period or a number of click maximum for each word then the link become a normal word again.

Someone knows if this solution exist for a vb 3.7 ? Thanks

I didn't found any ... so I decide to build one for word replacement only.
For tracking I'm using Fast Click SQL.
For link description you can use the title tag: <a href="http://localhost" title="Advertisement">Word</a>.

WEBDosser 04-17-2008 11:50 AM

Reserved...

msorin 04-17-2008 07:00 PM

This did not work for me on 3.7 rc3. After installation and configuration the keyword did not link to anything. Is there a way to edit templates manually?

nfn 04-17-2008 07:43 PM

Quote:

Originally Posted by msorin (Post 1493194)
This did not work for me on 3.7 rc3. After installation and configuration the keyword did not link to anything. Is there a way to edit templates manually?

The replace process only replaces words between spaces to avoid mistakes.
An usual error would be replace the word train and all words with train in it's name would be replaced. Ex: trainers.

Quote:

Originally Posted by FRDS (Post 1492583)
Just use the replacement variables in the style manager and see if that works, it should.

There are advantages of using this method:
vB replaces word like trainers and this hack only replaces word between spaces to avoid mistakes.
vB is case insensitive, this is case sensitive to give you more control.
I tested replacement variables and after performing a search for the replaced word, my page gets broken.

msorin 04-17-2008 07:53 PM

Ummm so what's the fix for this or does this mod still need work?

nfn 04-17-2008 09:46 PM

The mod is working.
Theres a new version already.

What do you mean?

msorin 04-17-2008 11:14 PM

I installed it, configured the words but non of the key words on the forums are links.

Jasem 04-18-2008 03:47 AM

Good job, thanks

Nikke 04-18-2008 05:15 AM

Does this add queries? I used the vBGeeks GAL-system, but it was a bit heavy to say the least...

nfn 04-18-2008 07:42 AM

Quote:

Originally Posted by Nikke (Post 1493515)
Does this add queries? I used the vBGeeks GAL-system, but it was a bit heavy to say the least...

No, this will replace words without any queries.

nfn 04-18-2008 07:43 AM

Quote:

Originally Posted by msorin (Post 1493387)
I installed it, configured the words but non of the key words on the forums are links.

Did you upgrade to 1.0.1?
Theres a new download!

TalkPhotography 04-19-2008 09:27 PM

Installed this. Looks great.

It does have some limitations, in that it requires a space before AND after each trigger word to make it work.

What with vBulletin stripping the spaces at the end of lines and posts, it doesnt always work.
Same goes for full stops and other punctuation, like speech marks etc, this also kills the link (with the punctuation not being the space that the code requires).

That and of course the case-dependency.

Apart from those niggles, this is a great idea! Thanks :) Using it now :)

nfn 04-20-2008 02:35 PM

Quote:

Originally Posted by TalkPhotography (Post 1494759)
Installed this. Looks great.

It does have some limitations, in that it requires a space before AND after each trigger word to make it work.

What with vBulletin stripping the spaces at the end of lines and posts, it doesnt always work.
Same goes for full stops and other punctuation, like speech marks etc, this also kills the link (with the punctuation not being the space that the code requires).

That and of course the case-dependency.

Apart from those niggles, this is a great idea! Thanks :) Using it now :)

All (most of) limitations are removed :)
There's a new version that will let you define some more options like case sensitive and spacing.

pablo 05-02-2008 08:19 AM

works like a charm on my poker forum, thanks.

adivor 05-02-2008 12:14 PM

Thanks for this mod.......

nfn 05-02-2008 01:49 PM

Quote:

Originally Posted by pablo (Post 1505503)
works like a charm on my poker forum, thanks.

Of course it works :)

Quote:

Originally Posted by adivor (Post 1505693)
Thanks for this mod.......

You're welcome.

Alfa1 05-02-2008 08:11 PM

Please add the function to add multiple replacements.

blastup 05-03-2008 12:00 AM

awesome just what i need on my webmasters forum http://millionwebmasters.com

blastup 05-03-2008 12:02 AM

awesome this is the bomb oh yea thanks for the hard work haha awesome awesome awesome props to you

nfn 05-03-2008 08:56 AM

Quote:

Originally Posted by Alfa1 (Post 1506116)
Please add the function to add multiple replacements.

I don't understand ...
You can replace as many word as you want?!?! :(

blastup 05-05-2008 02:57 PM

um ok there is a problem.. it only replaced one word i have! on the first post.. the rest of the posts for (azoogleads) is not replaced? can you fix this? to make it replace like all (azoogleads) words

see here http://www.millionwebmasters.com/make-money-online/ the post on the bottom ( azoogleads) is not replaced

let me know asap thanks

nfn 05-05-2008 06:56 PM

Quote:

Originally Posted by blastup (Post 1509351)
um ok there is a problem.. it only replaced one word i have! on the first post.. the rest of the posts for (azoogleads) is not replaced? can you fix this? to make it replace like all (azoogleads) words

see here http://www.millionwebmasters.com/make-money-online/ the post on the bottom ( azoogleads) is not replaced

let me know asap thanks

It's not replaced because it adds a space before & after the word.
You may disable this in the Admin Panel.

SimonVlc 05-05-2008 07:13 PM

Great mod ;).

Just one question.

Do this replace text only inside the posts, or in all templates like the replacements vars function? (forums names, post titles, etc).

Thanks in advance, Simon.

nfn 05-06-2008 07:58 AM

Quote:

Originally Posted by SimonVlc (Post 1509647)
Great mod ;).

Just one question.

Do this replace text only inside the posts, or in all templates like the replacements vars function? (forums names, post titles, etc).

Thanks in advance, Simon.

Only inside posts!
That's the BIG difference...

SimonVlc 05-06-2008 09:31 AM

Quote:

Originally Posted by nfn (Post 1510161)
Only inside posts!
That's the BIG difference...

Just what I was looking ;). Thanks nfn!!!

wickedstangs 05-08-2008 11:34 PM

Does some have a nice demo? To see

Alfa1 05-09-2008 09:27 PM

Quote:

Originally Posted by nfn (Post 1506599)
I don't understand ...
You can replace as many word as you want?!?! :(

I see now. The screen shot got me confused.

Does this hack by default only affect words with a space before and after it or is that what the space function is for? Sorry for the stupid question, but better be safe than sorry in this case.

Does this work for old posts as well? Should we clear post cache?

nfn 05-10-2008 08:28 PM

Quote:

Originally Posted by wickedstangs (Post 1513197)
Does some have a nice demo? To see

Hi,

You can see in my signature if you can understand Portuguese ... these links differ from the default links by an image I've placed right after the word.
I've placed a screen shot for the links I use.

nfn 05-10-2008 08:44 PM

Quote:

Originally Posted by Alfa1 (Post 1514257)
Does this hack by default only affect words with a space before and after it or is that what the space function is for? Sorry for the stupid question, but better be safe than sorry in this case.

By default only replaced words between spaces and it's case sensitive ... you can fine tune this settings in the ACP.

Quote:

Originally Posted by Alfa1 (Post 1514257)
Does this work for old posts as well? Should we clear post cache?

Yes ... this is done when the post it's shown and doesn't changes the default content.
If it doesn't show on older posts, try to clean the cache.


All times are GMT. The time now is 05:20 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.01448 seconds
  • Memory Usage 1,833KB
  • 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
  • (18)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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