The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Help me finish my next hack
Hey guys, I haven't been online much since the recent move I did. Don't have much computer access where I'm staying at the moment, but I can't live without my computer and got really bored so I started to dig threw old request threads and saw someone requested a hack to turn a specified 'text' in a post and replace it with a 'url/link'. Well I looked around and didn't find it so I was rather happy that I could make a new hack cause I really didn't know what to do on the computer with no internet, was getting bored. ^^
Anyways, I started to think how I can do this, and it seemed pretty simple actually, just make a new table in the database named 'textlink' with a few needed fields such as 'textlinkid', 'text', and 'link' to hold the info. So I completely finish the admincp part of the hack. Now the next part was to make it read all the text in each post and check to see if any of the text posted needed to be replaced with a link. This again seemed rather simple to me. I figure I could use the str_replace() function built into PHP. This is where I got a dead end. Inside that function I need to it read the database field 'text' and replace it with the the info in the database field 'link'. Here's what I think it will look like if I'm not mistaking. PHP Code:
Database information: -Textlink (table name) ---textlinkid (field name for the id of the text/link) ---text (field name for the text to replace) ---link (field name for the url to replace the text with) Thanks in advance everyone! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|