Advertisement:

Fonts drop down selection & URL in post screen

Begonnen von codenaught, Oktober 09, 2004, 12:37:49 NACHMITTAGS

Vorheriges Thema - Nächstes Thema

Sarge


    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Zitat
<H> I had zero posts when I started posting

I AM Legend

Hi All,
I saw some people saying that only some of the safe colors work, I use this web site, it has all the safe colors and variations on the safe colors and all work fine that I have used, hope it helps:

http://www.echoecho.com/htmlhexcolors07.htm

Thanks All

Indonesian

#82

Just in case anyone is interested!
Fonts size Font & Tab_Indent drop down selection & URL in post screen code SMF 1.1.7

I still look for a mode so my BBC code is Highlighted in a different color or bold but could not find anything!



[nofollow]
http://indonesian.10001mb.com/smfforum/index.php/topic,170.msg228.html#msg228 [nofollow]

Find in = Post.template.php
Zitat
Zitat<option value="LimeGreen">', $txt[275], '</option>
</select>';
echo '
<br />'; 

Add After
Zitat// Print a drop down list for font size!
echo ' <select onchange="surroundText(\'[size=\'+this.options[this.selectedIndex].value+\']\', \'[/size]\', document.'$context['post_form'], '.'$context['post_box_name'], '); this.selectedIndex = 0;" style="margin-bottom: 1ex;">
<option value="" selected="selected">Font Size</option>
<option value="7pt">7pt</option>
<option value="8pt">8pt</option>
<option value="9pt">9pt</option>
<option value="11pt">11pt</option>
<option value="12pt">12pt</option>
<option value="13pt">13pt</option>
<option value="14pt">14pt</option>
<option value="15pt">15pt</option>
<option value="16pt">16pt</option>
<option value="18pt">18pt</option>
<option value="19pt">19pt</option>
<option value="20pt">20pt</option>
<option value="21pt">21pt</option>
</select>'
;

// Print a drop down list for Tab_Indent!
echo ' <select onchange="surroundText(\'\'+this.options[this.selectedIndex].value+\'\', \'\', document.'$context['post_form'], '.'$context['post_box_name'], '); this.selectedIndex = 0;" style="margin-bottom: 1ex;">
<option value="" selected="selected">Indent</option>
<option value="  ">1Tab</option>
<option value="  ">2Tab</option>
<option value="  ">3Tab</option>
<option value="  ">4Tab</option>
<option value="  ">5Tab</option>
<option value="  ">6Tab</option>
<option value="  ">7Tab</option>
<option value="  ">8Tab</option>
<option value="  ">9Tab</option>
<option value="  ">10Tab</option>
</select>'
;

// Begin Print a drop down list for font face . . . . . . .
echo ' <select onchange="surroundText(\'[font=\'+this.options[this.selectedIndex].value+\']\', \'[/font]\', document.'$context['post_form'], '.'$context['post_box_name'], '); this.selectedIndex = 0;" style="margin-bottom: 1ex;">
<option value="" selected="selected">Font Face</option>
<option value="Arial" style="font-family:arial">Arial</option>
<option value="Arial Black" style="font-family:arial black">Arial Black</option>
<option value="Comic Sans MS" style="font-family:comic sans ms">Comic Sans MS</option>
<option value="Courier New" style="font-family:courier new">Courier New</option>
<option value="Georgia" style="font-family:georgia">Georgia</option>
<option value="Times New Roman" style="font-family:times new roman">Times New Roman</option>
<option value="Tahoma" style="font-family:tahoma">Tahoma</option>
<option value="Verdana" style="font-family:verdana">Verdana</option>
<option value="Trebuchet MS" style="font-family:trebuchet ms">Trebuchet MS</option>
<option value="Impact" style="font-family:impact">Impact</option>
</select>'
;

 
// End Print a drop down list for font face . . . . . . . .


  • For single Tab&nbsp; Using multi space usally gets saved in HTML CODE&nbsp; .... &nbsp; &nbsp;&nbsp; &nbsp; ...no problem with multi Tab!
    Find

Zitat
'list' => array('code' => 'list''before' => '[list]\n[list][li]''after' => '[/li][/list]\n[list][li][/li][/list]\n[/list]''description' => $txt[261]),



  • Add After
Zitat array(),
'tab' => array('code' => 'tab''before' => '  ''after' => '''description' => $txt['Tab_Indent']),


Find in = /default/languages/Modifications.english.php
Zitat  ?>  


  • Add before
Zitat  $txt['Tab_Indent'] = 'Tab_Indent';


  • Note:
    * you can modify the red text: <option value="">10pt</option> to your own needs.
    * to remove the default tag buttons, look for and delete:
Zitat  array(),
'size' => array('code' => 'size''before' => '[size=10pt]''after' => '[/size]''description' => $txt[532]),
'face' => array('code' => 'font''before' => '[font=Verdana]''after' => '[/font]''description' => $txt



  • 2- URL input boxes
Find in = Post.template.php
Zitat// Print a drop down list for all the colors we allow!

Add above:

Zitat  // Java script to handle URL input boxes ...
echo '<script language="JavaScript" type="text/javascript">
<!--
function urlINPT(){
// Enter URL .........................................
var urlLINK = prompt("Please enter URL address:","http://");
if (urlLINK == null ){ //cancel pressed . . .
}
else if (urlLINK == "" || urlLINK == " "){ //ok pressed but with Notext . . .
alert("Sorry no text entered!");
}
else
{ //ok pressed and there is something :)
// Enter Description ...................................
var urlNAME = prompt("Please enter URL name:","");
if (urlNAME == null ){ //cancel pressed . . .
}
else if (urlNAME == "" || urlNAME == " "){&nbsp; //ok pressed but with notext so use URL only!
surroundText(\'[url=http://\'+urlLINK+\'\', \']\'+urlLINK+\'\', \'[/url]\', document.'
$context['post_form'], '.'$context['post_box_name'], ');
}
else //ok pressed with text so use URL and Name!
 surroundText(\'[url=http://\'+urlLINK+\']\'+urlNAME+\'\', \'[/url]\', document.'
$context['post_form'], '.'$context['post_box_name'], ');
}
}
// -->
</script>'
;


  • Find:
Zitat  // Is this tag disabled?
if (!empty($context['disabled_tags'][$tag['code']]))
continue;

  • Add After:
Zitat// only replace the URL tag! . . . . . . . . . . .
 if ($tag['code'] == 'url')
 echo '<a href="javascript:void(0);" onclick="urlINPT(); return false;"><img onmouseover="bbc_highlight(this, true);" onmouseout="if (window.bbc_highlight) bbc_highlight(this, false);" src="'$settings['images_url'], '/bbc/'$image'.gif" align="bottom" width="23" height="22" alt="'$tag['description'], '" title="'$tag['description'], '" border="0" style="background-image: url('$settings['images_url'], '/bbc/bbc_bg.gif); margin: 1px 2px 1px 1px;" /></a>';


recep34

Url input boxes didnt work.the theme which i use doesnt have post.template.php file so edited the default themes...

İ had two icons but when i click the new one nothing happens..

http://armatr.cybernetic-hosting.co.uk/dosyalar/Post.template.rar

STS

This is great. I just used the URL and IMAGE modifications, but really like the difference.

However, for some reason I'm getting three of the ||| images (/bbc/divider.gif) showing up between the mail image and the next one. I can't seem to be able to fix it.

brandonroy

Zitat von: STS in Januar 15, 2009, 11:39:50 NACHMITTAGS
This is great. I just used the URL and IMAGE modifications, but really like the difference.

However, for some reason I'm getting three of the ||| images (/bbc/divider.gif) showing up between the mail image and the next one. I can't seem to be able to fix it.

I'm getting the same thing..

And if anyone knows how to make it so that you can type some text and highlight it, then click on the button to insert the hyperlink, and all it will ask for is the url - That would be super cool.

STS

If anyone knows a fix for the funky ||| that would be great.  :-*

Arantor

Holder of controversial views, all of which my own.


nunopitbull

Would like to know, in this mod: http://custom.simplemachines.org/mods/index.php?mod=938

How can i make the text i wanna enter (after i select the URl in popup box) to be highlighted. Like i click any letter in my keyboard and it edits. Dunno if im making myself clear :s

Arantor

Holder of controversial views, all of which my own.


steve51184


polowest

Hi,
thanks for mod.

But this not work with IE8.

Have you a solution?

Luis-

So sorry for bumping this but I can't find any of the information that I need to look for in the Post.template.php. I really want to edit the drop-down menus. Can someone help me?

Chalky

Zitat von: Luis- in März 03, 2012, 06:45:19 NACHMITTAGS
So sorry for bumping this but I can't find any of the information that I need to look for in the Post.template.php. I really want to edit the drop-down menus. Can someone help me?

I'd really like to use the URL part of this - please does anyone know how to adapt this trick for 2.0.2?

Masterd

This trick is a default feature in SMF 2.0. For any addotional edits look inside Post.template.php and Subs-Post.php or I just misunderstanded everything? (Didn't sleep very well.)

huangjinmei

Not by pushbutton?I think the best way is through the Automatic speech~ ;D ;)

Advertisement: