News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

[poem] Tag [/poem]

Started by kurotenshi, March 21, 2005, 05:16:45 PM

Previous topic - Next topic

kurotenshi

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' => '
    \n
    • ', 'after' => '
    \n
    \n
', '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]

A.M.A

useful tip .. thanks for sharing it.
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

kurotenshi

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 :)

CuTe_MaN

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


kurotenshi

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.

Valiantheart

#6
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.

kamili34

#7
I'm sad becouse it doesn't work on smf 1.1.3  :'(

speak121

alguien sabe como convertir este mod para el smf 1.1.2?

speak121

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?

speak121

#10
ok, is done, tomorrow i post it, today is too late.. :p

Example:


speak121

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!

speak121

Español:
En esta página podéis ver su funcionamiento y bajaroslo:
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

Any problem please report in this board.

Thx!

Harro

Did you manage to do it?
I can set up a test board to give it a try if you want.

speak121

Thx Harro,

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

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

Advertisement: