News:

Wondering if this will always be free?  See why free is better.

Main Menu

[edit] Tag [/edit]

Started by kurotenshi, March 20, 2005, 07:31:04 PM

Previous topic - Next topic

kurotenshi

I often use [edit] tag when I was edited to some post. Then my mind pop-up "Hey, let's made this a BBC!"
Ok, then I made it. And here it are, for you all, fancy [edit] tag ;D

Paste this in Sources/Subs.php after line 913
// Edit tag
'~\[edit\](?:<br />)?~i' => isset($disabled['edit']) ? '<div>' : '<div style="font-size: x-small; font-weight: 600;">Editor says:</div><div style="border: 1px solid black; font-size: x-small; font-weight: bold; padding: 2px; background: pink;">',


Then put this code in your Post.template.php after line 648

'edit' => array('code' => 'edit', 'before' => '[edit]', 'after' => '[/edit]', 'description' => 'Post editing'),

Ok, and then you can use [edit] [/edit] in your board.

Preview in action: link dead, removed by Owdy.

Sorry, pink is fine color :P

FaSan


[Unknown]

Background pink?

Anyway, looks fine to me :).

-[Unknown]

frost

i like this solution!!


can it be made a feature in  the next issue of SMF? pllleeeeeaaaaasssseeeeeeeee????:D :D :D

kurotenshi

Quote from: [Unknown] on March 20, 2005, 09:14:38 PM
Background pink?

Yes!! Why not  ;D I just pick a color what isn't in common use... And pink is just that kind color. But anyone could change it, if want...

Dannii

Thanks, I should be able to use this for something else similar I want. Can you put the preview back up?
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Owdy

Quote from: Infrequentia on March 20, 2005, 07:31:04 PM

Preview in action: http://hob-art.dy.fi/smftest/index.php?topic=2.0

Quote
Apologies
Whole HoB-Art server is closed for this weekend. We upgrade ja modify server more secure and functional.
We are sorry about this break!
::)
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Owdy

I use this in 1.1
// Edit tag
'~\[edit\](?:<br />)?~i' => isset($disabled['edit']) ? '<div>' : '<div style="font-size: x-small; font-weight: 600;">Muokkaus:</div><div style=" font-size: xx-small;  padding: 2px; ">',


This prints end tag
[/edit] 
in post. Any ideas why?

Second quoestion, what if i want only my moderators to see that edit button, how d i do that?
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

[Unknown]

For the code, you want this:

// Edit tag
'~\[edit\](?:<br />)?~i' => isset($disabled['edit']) ? '<div>' : '<div style="font-size: x-small; font-weight: 600;">Muokkaus:</div><div style="font-size: xx-small;  padding: 2px; ">',
'~(?:<br />)?\[/edit/]~i' => '</div>',


-[Unknown]

Owdy

Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Owdy

#10
fixed:

// Edit tag
'~\[edit\](.+?)\[/edit\]~i' => isset($disabled['edit']) ? '$1' : '<span style="font-size: xx-small; font-weight: 600;font-style:italic ">Muokkaus:</span><br /><span style="font-size: xx-small;font-style:italic ">$1</span>',


How about that button?
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

[Unknown]

Well, you only show it if $user_info['is_moderator']...

-[Unknown]

Karmalakas

Here you go

// Edit tag
'~\[edit\](.+?)\[/edit\]~i' => isset($disabled['edit']) ? '$1' : '<div style="font-size: x-small; font-weight: 600;">Editor says:</div><div style="border: 1px solid black; font-size: x-small; font-weight: bold; padding: 2px; background: pink;">$1</div>',


It's like in first post in pink background and doesn't print end tag ;)

Owdy

Quote from: CRONUS on May 04, 2005, 02:15:20 AM
Here you go

// Edit tag
'~\[edit\](.+?)\[/edit\]~i' => isset($disabled['edit']) ? '$1' : '<div style="font-size: x-small; font-weight: 600;">Editor says:</div><div style="border: 1px solid black; font-size: x-small; font-weight: bold; padding: 2px; background: pink;">$1</div>',


It's like in first post in pink background and doesn't print end tag ;)

Thanks, allready fixed ;D
http://www.simplemachines.org/community/index.php?topic=31015.msg246300#msg246300
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Karmalakas

Quote from: Owdy on May 04, 2005, 05:33:28 AM
Thanks, allready fixed ;D
http://www.simplemachines.org/community/index.php?topic=31015.msg246300#msg246300

But that fix doesn't make pink background :) and it doesn't separete at all Edit from the original post

Owdy

I really dont want pink background ;) Its just the way i like it.
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

kurotenshi

Quote from: Owdy on May 04, 2005, 10:36:03 AM
I really dont want pink background ;) Its just the way i like it.
You don't wan't pink background!? Why, it's so cute color x)
Btw, I just put some uncommon color to bgcolor, and anyone can change it color whatever they wan't.

Karmalakas

Now i have a prob :(

How to make it work with SMF 1.0.3 and Faster Parse Code installed :(

Advertisement: