Welcome
Welcome to the <strong>Tribal Wars Enhancer</strong> forums!

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. <a href="/profile.php?mode=register">Join our community today</a> and help improve the tribal wars game!

[achieved]: bbcodes icones

Archive of completed and closed feature requests

Moderators: enduo, Developers

[achieved]: bbcodes icones

Postby Zeeman on Sun Mar 02, 2008 1:10 pm

does little you one to add this script have the place of that existing
because that is to it ^lus complete



Image




http://userscripts.org/scripts/show/23433
Zeeman
Beta tester
 
Posts: 15
Joined: Sun Feb 24, 2008 12:03 pm

Postby maxime on Sun Mar 02, 2008 3:36 pm

@ zeeman: ce n'est pas facile de comprendre ce que tu veux dire :P N'hesite pas a parler en francais et je fais la traduction si tu veux ;)
maxime
Beta tester
 
Posts: 154
Joined: Wed Feb 20, 2008 11:51 am

Postby Zeeman on Sun Mar 02, 2008 9:35 pm

je voulais juste demander si il était possible de mettre ce script en remplacement des icones bbcodes car ce script est plus complet

merci
Zeeman
Beta tester
 
Posts: 15
Joined: Sun Feb 24, 2008 12:03 pm

Postby maxime on Sun Mar 02, 2008 10:36 pm

Zeeman wrote:je voulais juste demander si il était possible de mettre ce script en remplacement des icones bbcodes car ce script est plus complet

merci
I would like to know if it was possible to replace the actual BBcode icons by this script, which is more complete.


Et aucun probleme Zeeman ;)
maxime
Beta tester
 
Posts: 154
Joined: Wed Feb 20, 2008 11:51 am

Postby timas on Mon Mar 03, 2008 9:08 pm

Zeeman: thank you for you persistance! :)

Maxime: Thank you so much for translating, I never paid enough attention to french at school :/

If it's a more complete and workable piece of code for BB codes I will absolutely merge it into the script or rewrite my code to reflect their much cooler code :)

Maxime, if you could indulge in translating once more I'd be much obliged!
timas
Developer
 
Posts: 503
Joined: Tue Feb 19, 2008 10:56 am

Postby Zeeman on Mon Mar 03, 2008 9:59 pm

c'est normal je veux y arriver! timas
Zeeman
Beta tester
 
Posts: 15
Joined: Sun Feb 24, 2008 12:03 pm

Postby maxime on Mon Mar 03, 2008 11:50 pm

Zeeman wrote:c'est normal je veux y arriver! timas
Its normal, I want to succeed! Timas

And being french myself helps a lot for translating ;)
maxime
Beta tester
 
Posts: 154
Joined: Wed Feb 20, 2008 11:51 am

Postby thingy on Thu Mar 13, 2008 10:32 pm

personally i just added the code snippets for the bb'codes i wanted =D
Code: Select all
   var xhtml = "<table class='bbcodearea'> " +
          "<tr>    " +
          '   <td><a tabindex="10" href="javascript:insertBB(\'player\','+random+');"><img src="'+ TW_Image_Base +'/face.png" alt="Insert player BB code" /></a></td>' +
          '   <td><a tabindex="11" href="javascript:insertBB(\'village\','+random+');"><img src="'+ TW_Image_Base +'/buildings/main.png" alt="Insert village BB code" /></a></td>' +
          '   <td><a tabindex="12" href="javascript:insertBB(\'tribe\','+random+');"><img src="'+ TW_Image_Base +'/command/support.png" alt="Insert tribe BB code" /></a></td>' +
          '   <td><a tabindex="13" href="javascript:insertBB(\'bold\','+random+');"><b>B</b></a></td>' +
          '   <td><a tabindex="14" href="javascript:insertBB(\'italic\','+random+');"><b><i>I</i></b></a></td>' +
          '   <td><a tabindex="15" href="javascript:insertBB(\'underline\','+random+');"><b><u>U</u></b></a></td>' +
          '   <td><a tabindex="16" href="javascript:insertBB(\'strikethrough\','+random+');"><b><s>S</s></b></a></td>' +
          '   <td><a tabindex="17" href="javascript:insertBB(\'quote\','+random+');"><b>[quote]</b></a></td>' +
          "</tr>   " +
          "</table>";


this would be the actual lineup // link to the code =)
above the reply section.
Code: Select all
switch (insertType) {
            case 'player':
               txtinsertBefore = "[player]";
               txtinsertAfter = "[/player]";
               insertButton = 'P';
               break;
            case 'village':
               txtinsertBefore = "[village]";
               txtinsertAfter = "[/village]";
               insertButton = 'V';
               break;
            case 'tribe':
               txtinsertBefore = "[ally]";
               txtinsertAfter = "[/ally]";
               insertButton = 'A';
               break;
            case 'bold':
               txtinsertBefore = "[b]";
               txtinsertAfter = "[/b]";
               insertButton = ' ';
               break;
            case 'italic':
               txtinsertBefore = "[i]";
               txtinsertAfter = "[/i]";
               insertButton = ' ';
               break;
            case 'underline':
               txtinsertBefore = "[u]";
               txtinsertAfter = "[/u]";
               insertButton = ' ';
               break;
            case 'strikethrough':
               txtinsertBefore = "[s]";
               txtinsertAfter = "[/s]";
               insertButton = ' ';
               break;
            case 'quote':
               txtinsertBefore = "[quote]";
               txtinsertAfter = "[/quote]";
               insertButton = ' ';
               break;            

         }

this section does the replacing, well not the actual replacing, but is the selection what to use in the replacement =)

basicly these two section is the only thing you need to change =)

so to add a new snippet yourself, you'd create a link for the action to take place..
use one of the above lines as exmpl.
then put in the 'case' of that being pressed use the second snipped as refference for this.
''''''''''''''''''''
silly example
Code: Select all
'   <td><a tabindex="99" href="javascript:insertBB(\'my_defenition\','+random+');"><b>acutal link</b></a></td>' +

case 'my_defenition':
txtinsertbefore ="[tag to open your bbcode]"
txtinsertAfter =[tag that closes your bbcode]

now, adding these two snippets into the code, you'd be creating a new link above the type box, named 'acutal link' (just noticed my bad spelling).. anyhow....
that link will depend on the 'swithc command' and when the 'case' equals 'my_definition' it will use the prefixes put there..
in this case you'd have :
[tag to open your bbcode]your text[tag that closes your bbcode]
as a result..

''''
that was my 5minute doo it yourself tutorial =D
''''
on another note..
if possible, not sure about this, but the selected area you'r using the bbcode on , will loose focus, and thereby jump to the top of the page..

'i tend to type long posts allot, and therefor really annoying having to scroll down all the time =(

any idea about this?
thingy
 
Posts: 3
Joined: Wed Feb 20, 2008 10:34 pm

Postby timas on Sun Mar 16, 2008 11:58 pm

on the jumping back to the start: not really :/ it's a issue phpBB also has and they have spent quite some time on fixing stuff like that
I do find it annoying, so I'll probably end up trying a few fixes
timas
Developer
 
Posts: 503
Joined: Tue Feb 19, 2008 10:56 am

Postby mog on Mon Mar 17, 2008 3:38 am

timas wrote:on the jumping back to the start: not really :/ it's a issue phpBB also has and they have spent quite some time on fixing stuff like that
I do find it annoying, so I'll probably end up trying a few fixes


if phpBB has fixed this we can just use the same javascript they use.
mog
Developer
 
Posts: 180
Joined: Fri Mar 07, 2008 9:10 pm

Postby timas on Mon Mar 17, 2008 1:25 pm

I was trying to say they have the same problem still ;)
timas
Developer
 
Posts: 503
Joined: Tue Feb 19, 2008 10:56 am

Postby MyGP4U2NV on Mon Mar 24, 2008 8:05 pm

Will this script allow me to use [village][/village], [player][/player] and [ally][/ally] on an external site? If not is there somewhere I can find a script that does that?
MyGP4U2NV
 
Posts: 2
Joined: Mon Mar 24, 2008 6:58 am

Postby timas on Tue Mar 25, 2008 9:26 am

It wont, the script is limited to running inside the TW domains..
timas
Developer
 
Posts: 503
Joined: Tue Feb 19, 2008 10:56 am

the extra BB codes..

Postby themanthemyththelegend on Mon Apr 21, 2008 5:51 pm

IS this in the curent version ?
themanthemyththelegend
 
Posts: 8
Joined: Thu Apr 17, 2008 3:54 am

Postby timas on Thu May 29, 2008 10:01 pm

nope, the new version currently does not have a bb plugin. It is in the works for 3.01 or so
timas
Developer
 
Posts: 503
Joined: Tue Feb 19, 2008 10:56 am


Return to Completed and closed features

Who is online

Users browsing this forum: No registered users and 0 guests