BBCode Adoptable Reference - VERY SMALL MOD

Forum
Last Post
Threads / Messages

The Codfin Keeper

A Codfin draws near!
Member
Joined
Jan 21, 2011
Messages
91
Points
0
Location
Either CT or the Slug's house
Mysidian Dollar
7,522
Okay, this is a code so users can reference adoptables on your site without having to use img and url codes wherever there's BBCode enabled.

Under the folder inc, open up bbcodes.php:

Where it has all the BBCodes, under one of them put:

PHP:
$text = preg_replace('|\[adoptable\](.+?)\[\/adoptable\]|i', '<a href="/levelup.php?id=$1"><img src="/siggy.php?id=$1"></a>', $text);

...where "adoptable" can be changed to your liking.

Have fun, and this is a very small mod, if you didn't see so by the title.
 
Last edited:
Oh hey this :3 I remember you talking about this 8D

To ignore the 'yoursite' thing you can change it to:
Code:
[COLOR=#000000][COLOR=#dd0000]<img src="/siggy.php?id=$1">[/COLOR][/COLOR]
Something like that :3 It auto adds the beginning

Why is my text red all of a sudden? D:
 
@Gigi - lol ok I'll change that.

@Roconza - basically it's adding a new BBCode to the list of BBCodes (bold, italics, color, image, url, etc.) that allows users to reference an adoptable (levelup link and image) using one BBCode tag. This involves going into that BBCode file on your Mys site, and adding this in so you and other users can use it wherever BBCode is allowed on your site.
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,267
Messages
33,048
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top