Advertisement:

Author Topic: [edit] Tag [/edit]  (Read 29973 times)

kurotenshi

  • Guest
[edit] Tag [/edit]
« on: March 20, 2005, 07:31:04 PM »
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
Code: [Select]
// 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

Code: [Select]
'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
« Last Edit: May 04, 2005, 05:42:25 AM by Owdy »

Offline FaSan

  • Sophist Member
  • *****
  • Posts: 1,053
  • Gender: Male
  • http://www.smitaly.net
    • SMitaly - Supporto a SMF
Re: [edit] Tag [/edit]
« Reply #1 on: March 20, 2005, 08:42:33 PM »
Great ! ;)

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: [edit] Tag [/edit]
« Reply #2 on: March 20, 2005, 09:14:38 PM »
Background pink?

Anyway, looks fine to me :).

-[Unknown]

Offline frost

  • Semi-Newbie
  • *
  • Posts: 63
Re: [edit] Tag [/edit]
« Reply #3 on: March 20, 2005, 11:31:59 PM »
i like this solution!!


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

kurotenshi

  • Guest
Re: [edit] Tag [/edit]
« Reply #4 on: March 21, 2005, 05:48:23 AM »
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...

Offline Dannii

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,211
  • Mind the volcano!
    • My homepage
Re: [edit] Tag [/edit]
« Reply #5 on: April 03, 2005, 08:46:41 AM »
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."

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,590
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
Re: [edit] Tag [/edit]
« Reply #6 on: April 03, 2005, 08:49:12 AM »

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

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,590
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
Re: [edit] Tag [/edit]
« Reply #7 on: April 12, 2005, 11:01:15 AM »
I use this in 1.1
Code: [Select]
// 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

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: [edit] Tag [/edit]
« Reply #8 on: April 12, 2005, 11:05:14 AM »
For the code, you want this:

Code: [Select]
// 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]

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,590
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
Re: [edit] Tag [/edit]
« Reply #9 on: April 12, 2005, 11:15:47 AM »
That does the same
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

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,590
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
Re: [edit] Tag [/edit]
« Reply #10 on: April 12, 2005, 01:49:19 PM »
fixed:

Code: [Select]
// 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?
« Last Edit: April 12, 2005, 02:09:37 PM by 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

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: [edit] Tag [/edit]
« Reply #11 on: April 15, 2005, 10:43:13 AM »
Well, you only show it if $user_info['is_moderator']...

-[Unknown]

Offline CRONUS

  • Jr. Member
  • **
  • Posts: 166
  • Gender: Male
    • MOBILES.lt
Re: [edit] Tag [/edit]
« Reply #12 on: May 04, 2005, 02:15:20 AM »
Here you go

Code: [Select]
// 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 ;)

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,590
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
Re: [edit] Tag [/edit]
« Reply #13 on: May 04, 2005, 05:33:28 AM »
Here you go

Code: [Select]
// 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

Offline CRONUS

  • Jr. Member
  • **
  • Posts: 166
  • Gender: Male
    • MOBILES.lt
Re: [edit] Tag [/edit]
« Reply #14 on: May 04, 2005, 08:13:06 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

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,590
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
Re: [edit] Tag [/edit]
« Reply #15 on: May 04, 2005, 10:36:03 AM »
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

  • Guest
Re: [edit] Tag [/edit]
« Reply #16 on: May 04, 2005, 10:49:57 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.

Offline CRONUS

  • Jr. Member
  • **
  • Posts: 166
  • Gender: Male
    • MOBILES.lt
Re: [edit] Tag [/edit]
« Reply #17 on: June 02, 2005, 03:36:28 AM »
Now i have a prob :(

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