Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: kurotenshi on March 21, 2005, 05:16:45 PM

Title: [poem] Tag [/poem]
Post by: kurotenshi on March 21, 2005, 05:16:45 PM
Becouse I work much whit music and arts. I write lots of lyrics or poems. Then I think, if some onewrite them too in boards? Ok. Now I made [poem] tag. So it can use whit lyric or poems or what ever we want :)
I hope that someone need it ;D

[edit] Noe this link shows updated [poem] tag[/edit]
Preview: http://hob-art.dy.fi/smftest/index.php?topic=3 Site down.

Code:

Find in Subs.php this (should found in line 923):
'~\[pre\](.+?)\[/pre\]~i' => isset($disabled['pre']) ? '$1' : '<pre>$1</pre>',

Add after that:
code]// Poem tag
'~\[poem title=(.{1,80}?)\](?:<br />)?~i' => isset($disabled['poem']) ? '<div>' : '<div style="font-family: Times New Roman, Serif; font-style: Italic; font-size: large; text-decoration: underline; padding: 3px;">$1</div><pre style="font-family: Times New Roman; font-style: Italic; font-size: small;">',
'~\[poem\](?:<br />)?~i' => isset($disabled['poem']) ? '<div>' : '<pre style="font-family: Times New Roman; font-style: Italic; font-size: small;">',
'~\[/poem\](?:<br />)?~i' => isset($disabled['poem']) ? '</pre>' : '</div>',
// Poem tag end


Find in Post.template.php this (should found in line 650):
'list' => array('code' => 'list', 'before' => '', 'description' => $txt[261]),

Add after that:
'poem' => array('code' => 'poem', 'before' => '[poem]', 'after' => '[/poem]', 'description' => '[poem]'),

[color=red]NOTE: If your board uses multiple themes, you should add that Post.template.php code in EVERY Post.template.php files![/color]

[edit]
Few typos removed. I try to made this little more advance. So then could add also title that poem or song :) like [poem=title]
[/edit]

[edit]
Script was updated little. Now you can use title too. So poem tag look now [poem title=poem name] Poem or lyric [/poem]
[/edit]


[edit]Site is down[/edit]
Title: Re: [poem] Tag [/poem]
Post by: A.M.A on March 21, 2005, 07:16:03 PM
useful tip .. thanks for sharing it.
Title: Re: [poem] Tag [/poem]
Post by: kurotenshi on March 21, 2005, 09:02:29 PM
Ok. I was updated this scrip little. Look changes in first post. Theres too instroductions to add this in your board :)
Now this tag is more usefull :)
Title: Re: [poem] Tag [/poem]
Post by: CuTe_MaN on June 01, 2006, 07:23:15 PM
Nice tip

but i tried to implement it in my forum

but i couldnt find the required code

I am using SMF 1.1 RC2

please if u can help in giving me the solution


thx

CuTe_MaN
Title: Re: [poem] Tag [/poem]
Post by: ArkServer on June 01, 2006, 07:30:58 PM
Your site doesnt work.
Title: Re: [poem] Tag [/poem]
Post by: kurotenshi on June 22, 2006, 09:17:49 AM
Quote from: CuTe_MaN on June 01, 2006, 07:23:15 PM
Nice tip

but i tried to implement it in my forum

but i couldnt find the required code

I am using SMF 1.1 RC2

please if u can help in giving me the solution


thx

CuTe_MaN

This was done for 1.0.* versions. Sorry.
Title: Re: [poem] Tag [/poem]
Post by: Valiantheart on October 18, 2006, 12:12:58 AM
I tried to modify this for a simple [spoiler]tag[/spoiler]

This is what I added to Subs.php

// Spoiler tag
'~\[spoiler title=(.{1,80}?)\](?:<br />)?~i' => isset($disabled['spoiler']) ? '<div>' : '<div style="font-family: Times New Roman, Serif; color: #727272; font-size: large; text-decoration: underline; padding: 3px;">$1</div><pre style="font-family: Times New Roman; color: #FAFAFA; font-size: small;">',
'~\[spoiler\](?:<br />)?~i' => isset($disabled['spoiler']) ? '<div>' : '<pre style="font-family: Times New Roman; color: #FAFAFA; font-size: small;">',
'~\[/spoiler\](?:<br />)?~i' => isset($disabled['spoiler']) ? '</pre>' : '</div>',
// Spoiler tag end



How do I change the BBC button for this? All I get now is the word "Spoiler" spanned over two of the BBC button background.
Title: Re: [poem] Tag [/poem]
Post by: kamili34 on July 02, 2007, 01:27:21 AM
I'm sad becouse it doesn't work on smf 1.1.3  :'(
Title: Re: [poem] Tag [/poem]
Post by: speak121 on July 05, 2007, 04:40:16 PM
alguien sabe como convertir este mod para el smf 1.1.2?
Title: Re: [poem] Tag [/poem]
Post by: speak121 on July 06, 2007, 09:17:44 AM
ok, i have all the modifications for 1.1.2 but i need to know how put the name who is writting the message.

Anyone help me?
Title: Re: [poem] Tag [/poem]
Post by: speak121 on July 08, 2007, 08:48:24 PM
ok, is done, tomorrow i post it, today is too late.. :p

Example:

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg509.imageshack.us%2Fimg509%2F7448%2Fpoemuu8.th.jpg&hash=2adeb71f9c5aae31dcf6a45a2e8e4979c8052c55) (http://img509.imageshack.us/my.php?image=poemuu8.jpg)
Title: Re: [poem] Tag [/poem]
Post by: speak121 on July 09, 2007, 06:18:05 PM
i need a person who have a test site of smf 1.1.2 and wants to probe the mod.

it's my first mod and i dont know if it works correctly.

Thx!
Title: Re: [poem] Tag [/poem]
Post by: speak121 on July 10, 2007, 11:28:49 AM
Español:
En esta página podéis ver su funcionamiento y bajaroslo:
http://pruebas121.awardspace.com/index.php?topic=2 (http://pruebas121.awardspace.com/index.php?topic=2)

Cualquier problema ponerlo aquí para que entre todos podamos resolverlo.

Gracias!


English:
You can find this mod at:
http://pruebas121.awardspace.com/index.php?topic=2 (http://pruebas121.awardspace.com/index.php?topic=2)

Any problem please report in this board.

Thx!
Title: Re: [poem] Tag [/poem]
Post by: Harro on July 28, 2007, 12:06:04 PM
Did you manage to do it?
I can set up a test board to give it a try if you want.
Title: Re: [poem] Tag [/poem]
Post by: speak121 on July 28, 2007, 12:54:34 PM
Thx Harro,

but I did it and is installed on the test forum.

You can view and download it if you want :D.