MyBB Community Forums

Full Version: MySource
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
A very simple mycode to make it easy when posting sources, if you have a site like mine where you post a lot of news and you need to include the source this will make it a little faster. And also it changes the size to small, because I think it looks nice. It isn't a button or anything just text.


Title:
Source


Short Description:
Makes posting sources easy.

Regular Expression:
\[source\](.*?)-(.*?)\[/source\]
ALT
\[source=(.*?)\](.*?)\[/source\]

Replacement:
<small>Source: <a href="$1">$2</a></small>



How to use:
[source]URL TO SOURCE HERE-SOURCE NAME HERE[/source]
ALT
[source=URL TO SOURCE HERE]SOURCE NAME HERE[/source]



Preview:

Source: PenHacks

http://MyCodeCorner.cz.cc for all the best MyCodes.
or you could do
\[source=(.*?)\](.*?)\[/source\]
But I am going to use this. Thanks alot.
(2010-01-03, 11:37 PM)Tierney Wrote: [ -> ]or you could do
\[source=(.*?)\](.*?)\[/source\]
But I am going to use this. Thanks alot.

That's true. You should use this one.

@op Great idea!
Thanks dude, I thought about doing source= but for some reason I just liked this better xP
sam with
[url=bla bla]bla bla[/url]
?
Hi I added a little to your source,
I use:
<hr style="border-style:dashed;border-width:1px;">
<small>Source: <a href="$1">$2</a></small>

just add a hr line above it Rolleyes is that ok? Thanks Big Grin
(2010-01-05, 04:04 AM)izor Wrote: [ -> ]sam with
[url=bla bla]bla bla[/url]
?

Not same, because then you have to put Source: your self then you also have to make it small your self. So yea...

(2010-01-05, 09:16 AM)Kazna Wrote: [ -> ]Hi I added a little to your source,
I use:
<hr style="border-style:dashed;border-width:1px;">
<small>Source: <a href="$1">$2</a></small>

just add a hr line above it Rolleyes is that ok? Thanks Big Grin


Not a problem with me. Thanks Big Grin
I just used it for the first time and realized it's missing target="_blank" so it opens in the same tab.
Here's how I have it:
\[source=(.*?)\](.*?)\[/source\]

<small>Source: <a href="$1" target="_blank">$2</a></small>