Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons

Reply
 
Thread Tools
vBaffiliate Links Details »»
vBaffiliate Links
Version: 1.1.0, by nfn nfn is offline
Developer Last Online: May 2012 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.7.5 Rating:
Released: 04-15-2008 Last Update: 04-19-2008 Installs: 120
Uses Plugins
Translations  
No support by the author.

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


Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 05-11-2008, 04:27 AM
briansol's Avatar
briansol briansol is offline
 
Join Date: Apr 2006
Location: CT
Posts: 254
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how tight is the replacement?

I have dismounted's ebay re-writer.

if i add
ebay -> ebay.com?mycampid
as a rule in this product, will it break the real ebay links?
Reply With Quote
  #43  
Old 05-11-2008, 11:18 AM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am experiencing a strange bug that might or might not be caused by a conflict of this hack with Nuwiki. Since I installed this hack, I am getting Nuwiki footnotes in various threads. As said; this may be totally unrelated, but I am mentioning it just in case anyone has the same experience.

EDIT: after disabling this hack and rebuilding post cache, this bug disappears.

nfn: when entering long lists of replacements, it will be easy to loose track. As is now, there are two fields to enter replacements in: one for the words that need to be replaced and one for all the words to replace with. In both fields, each new line separates a value. Imagine using a lot of replacements. Say 100. So the word on line 73 of the first box, will be replaced by line 73 of the second box. If the order of one line is messed up, then all lines under that will be messed up. So if line 6 would be deleted, then line 6 - 100 will be wrong. This means that all mentions of these 94 words in your database will be messed up forever. That is a very large impact. Could you please consider to either put the two boxes side by side or create another way to make sure that the replaced and the replacement are right next to each other?
Reply With Quote
  #44  
Old 06-04-2008, 10:49 AM
SimonVlc SimonVlc is offline
 
Join Date: Jun 2005
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed, great mod .

I just want to point that it don?t differentiate blocks of 2+ words from the 1 ones.

For example, if I put these 2 strings:

poker stars
stars

It will do 2 replacements in a imaginary "poker stars" string, one for the complete word, one for the stars one.

I will report any bug in the next days .
Reply With Quote
  #45  
Old 06-05-2008, 01:49 PM
forumguy forumguy is offline
 
Join Date: Aug 2004
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can we customize this so it would actually rewrite urls as wel?

Currently it only allows keywords, however lets say a user posted a link on the forum.

Can we adjust the script so that we can specify a part of the link so the script knows to append my affiliate id to the link?

Thanks
Reply With Quote
  #46  
Old 06-06-2008, 06:35 AM
SimonVlc SimonVlc is offline
 
Join Date: Jun 2005
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nfn View Post
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.
How can I clean the cache?

I have updated the link mask today, but my links still appear with the older one.

Cheers, Simon.
Reply With Quote
  #47  
Old 06-06-2008, 07:58 AM
nfn nfn is offline
 
Join Date: Feb 2007
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes ... I already thought that! In a new release I'll do that.

Quote:
Originally Posted by Alfa1 View Post
nfn: when entering long lists of replacements, it will be easy to loose track. As is now, there are two fields to enter replacements in: one for the words that need to be replaced and one for all the words to replace with. In both fields, each new line separates a value. Imagine using a lot of replacements. Say 100. So the word on line 73 of the first box, will be replaced by line 73 of the second box. If the order of one line is messed up, then all lines under that will be messed up. So if line 6 would be deleted, then line 6 - 100 will be wrong. This means that all mentions of these 94 words in your database will be messed up forever. That is a very large impact. Could you please consider to either put the two boxes side by side or create another way to make sure that the replaced and the replacement are right next to each other?
Reply With Quote
  #48  
Old 06-06-2008, 08:00 AM
nfn nfn is offline
 
Join Date: Feb 2007
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It will just replace ebay word and yes ... that way will break the url.

Quote:
Originally Posted by briansol View Post
how tight is the replacement?

I have dismounted's ebay re-writer.

if i add
ebay -> ebay.com?mycampid
as a rule in this product, will it break the real ebay links?
Reply With Quote
  #49  
Old 06-06-2008, 08:02 AM
nfn nfn is offline
 
Join Date: Feb 2007
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SimonVlc View Post
It will do 2 replacements in a imaginary "poker stars" string, one for the complete word, one for the stars one.
Yes ... you should place "starts" first.
Reply With Quote
  #50  
Old 06-06-2008, 08:03 AM
nfn nfn is offline
 
Join Date: Feb 2007
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you know the full url you can do that, but this is not optimized for that job.

Quote:
Originally Posted by forumguy View Post
Can we customize this so it would actually rewrite urls as wel?

Currently it only allows keywords, however lets say a user posted a link on the forum.

Can we adjust the script so that we can specify a part of the link so the script knows to append my affiliate id to the link?

Thanks
Reply With Quote
  #51  
Old 06-06-2008, 08:04 AM
nfn nfn is offline
 
Join Date: Feb 2007
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The replacement is done when the page is shown.

Quote:
Originally Posted by SimonVlc View Post
How can I clean the cache?

I have updated the link mask today, but my links still appear with the older one.

Cheers, Simon.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:43 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.10618 seconds
  • Memory Usage 2,303KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete