BBCode Edit

New BBCodes, tips and tricks, hacks and MODs for the BBCode system

BBCode Edit

Postby stitch626 » 29 Oct 2007, 21:08

Well I searched all over the place for this edit code and couldn't find it but then it dawned on me :doh: This should be pretty simple to write so I attempted it myself and hit right on the first try :grin:
Attachments
untitled.JPG
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7


Re: BBCode style test

Postby Sniper_E » 29 Oct 2007, 21:25

Awesome!
class="row6"???? You've been busy creating rows haven't you? :rotfl:
You could move your </b> back, put it after the first </font> so your message want be bold.
Good Job!
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6991
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: BBCode style test

Postby stitch626 » 29 Oct 2007, 21:51

HEHe, Yea I have been messing round with rows. That was a while ago. I wanted to get rid of some but I can't remember all the ones I am using. Most were just for experimenting with. :P

Just one question thouh. I can't seem to make the word EDIT in all caps.

Edit: If I do it here it will be in all caps.
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7

Re: BBCode style test

Postby Sniper_E » 29 Oct 2007, 22:35

That's weird, it should print it in the post exactly how you entered it in the HTML Replacement.
Ours is like this....
Code: Select all
<table class="tablebg" cellspacing="1"><tr><td class="row2" cellpadding="6"><strong>Edit:</strong> {TEXT}</td></tr></table>
Try making it all one line with no spaces / no line wraps)

You could do....
Code: Select all
<i><b style="color: #AA0000;">[EDIT]: </b>{TEXT}</i>
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6991
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: BBCode Edit

Postby stitch626 » 30 Oct 2007, 09:57

Well I thought I had better split this topic from the "test me" forum since this is beginning to turn into a support topic.

I have been fooling around with this and for some reason only the word "edit' will appear in lower case even if I enter it in the html replacement as all caps or the letter "E" as a cap. If I change it to any other word, it will appear as I enter it. So instead of the word "edit" I changed it to "Post Edit" and it appears exactly as is.

is this weird or what?
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7

Re: BBCode Edit

Postby onewalrus » 31 Oct 2007, 17:07

stitch626 wrote:Well I searched all over the place for this edit code and couldn't find it but then it dawned on me :doh: This should be pretty simple to write so I attempted it myself and hit right on the first try :grin:


Very nice... and what is it's function and where does the quoted code go?
onewalrus
Cadet I
Cadet I
 
Posts: 12
Joined: 02 Jul 2007, 04:37
Gender: Male

Re: BBCode Edit

Postby stitch626 » 31 Oct 2007, 18:25

Onewalrus,

Edit: This is an example using the edit bbcode

See how it places the word "Edit" and then places a table around the message? Its purpose is to flag an edited portion of a message if you come back and edit a post later on. It bassically lets it stand out so the reader knows that the post was edited.

You have to go to custom bbcode in your ACP under posting.

This is the bbcode.
Code: Select all
[Edit]{TEXT}[/Edit]

The html replacement is. (This is my version.)
Code: Select all
<table class="tablebg" width="100%" cellspacing="1">
<td class="row6" width="10%">
<i><strong><font color="#CC0000">[Post Edit]:</strong></font><font color="#000000">  {TEXT}</font></i>
</td>
</table>
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7

Re: BBCode Edit

Postby Sniper_E » 31 Oct 2007, 23:08

This would be the correct guideline in writing your code Stitch.
Code: Select all
<table class="tablebg" width="100%" cellspacing="1">
<td class="row6" width="10%">
<i><font color="#CC0000"><strong>[Post Edit]: </strong></font><font color="#000000">{TEXT}</font></i>
</td>
</table>
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6991
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: BBCode Edit

Postby stitch626 » 01 Nov 2007, 09:38

I don't see any difference except you placed the <strong> after the <i> :scratch:
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7

Re: BBCode Edit

Postby Sniper_E » 01 Nov 2007, 11:28

It will work either way.
What I was pointing out is that when you're writing codes their is a structure to go by.
Sort of a coding guideline to follow.
You need to look at the order of when a function starts and when it's closed.
The <i> starts that line and at the end of that line the </i> closes with that line.
That is the correct order those are placed in the line.
The </i> could be placed right after the {TEXT} and it would still work, but I would not put it there.

Look at this simple example and see where the opening and closing functions are placed in the line.
Code: Select all
[b][i][u]{TEXT}[/u][/i][/b] -OR- [i][u][b]{TEXT}[/b][/u][/i] -OR- [u][b][i]{TEXT}[/i][/b][/u]
It's just good practice to keep this in order. The codes in our pages are written in this order.
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6991
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Next

Return to BBCode System

Who is online

Users browsing this forum: No registered users and 7 guests