vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Replace Text (https://vborg.vbsupport.ru/showthread.php?t=50116)

limey 07-05-2003 03:16 PM

Has anyone gotten this to work without turning on HTML in their forums? I thought that was a big security risk? I would like to get this to work so it posts with VB url code, but can't seem to figure it out.

thanks.

xug 10-19-2003 02:57 PM

Quote:

Originally Posted by limey
Has anyone gotten this to work without turning on HTML in their forums? I thought that was a big security risk? I would like to get this to work so it posts with VB url code, but can't seem to figure it out.

thanks.

Yes, it's very simple to do it without HTML ON!!!!!!!

PHP Code:

function affiliateparse($text) {
   
$affiliate_code "[ URL=http://www.google.com ]Google[ /URL ]";
   
$text stri_replace("Google",$affiliate_code,$text); 

   return 
$text;


PS:
Remove the Spaces ;)

limey 10-19-2003 03:45 PM

Yeh but can you pull images? It pulls the url for me.

limey 10-19-2003 04:40 PM

Can you do mulitple keywords like "johnny","johnny2" ?

xug 10-19-2003 05:40 PM

Quote:

Originally Posted by limey
Yeh but can you pull images? It pulls the url for me.


You mean an image as an URL?

Then it would be like:

PHP Code:

function affiliateparse($text) {
   
$affiliate_code "[ URL=http://www.google.com ][ img]http://www.site.com/yourimage[ /img][ /URL ]";
   
$text stri_replace("Google",$affiliate_code,$text); 

   return 
$text;


PS:
Remove the Spaces ;)

xug 10-19-2003 06:03 PM

PHP Code:

function affiliateparse($text) {

   
$affiliate_code1 "[ URL=http://www.google.com ][ img]http://www.site.com/yourimage[ /img][ /URL ]";
   
$text stri_replace("Google",$affiliate_code1,$text); 

   
$affiliate_code2 "[ URL=http://www.google.com ][ img]http://www.site.com/yourimage[ /img][ /URL ]";
   
$text stri_replace("Google",$affiliate_code2,$text); 

   return 
$text;



ImportPassion 12-28-2003 03:41 AM

so what happens when someone puts the keyword in a URL on their own?
Does the link get messed up?

ImportPassion 12-28-2003 04:12 AM

yup, just found out that is does. damn, this would have been good.

limey 01-06-2004 08:13 PM

This still work for vb3?

yellowbird 06-23-2004 02:48 AM

How about a VB3 version? Anyone?


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