[3.2][3.3][DEV] Smilie Signs

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Suggested Hosts
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
Puchahawa
Registered User
Posts: 769
Joined: Sat Jan 01, 2011 10:33 pm
Name: Randy

Re: [RC] Smilie Signs

Post by Puchahawa »

Hi sniper. One of my members asked if I could do a page of all the smilies so they could see them. I tried to use the pages extension to do that and the sign part shows but not the post or smilie. Could you maybe take a look at that and see of there's something that can be done? I have it set to Parse BBCode and Parse smilies so I'm stumped.

Thanks

Randy
Avatar courtesy of artist Faith Coyotë
User avatar
Sniper_E
Registered User
Posts: 1136
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: [RC] Smilie Signs

Post by Sniper_E »

Well I'm not really sure what you are asking for.
I have a script you could place in your smiliesigns/images/ directory and then create a link to it.

It would show all of the smilie signs like this: View all Smilie Signs

Extract this signs_index.zip and place the index.php file in the smiliesigns/images/ directory.
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
User avatar
Puchahawa
Registered User
Posts: 769
Joined: Sat Jan 01, 2011 10:33 pm
Name: Randy

Re: [RC] Smilie Signs

Post by Puchahawa »

That should work for them. Thanks :)
Avatar courtesy of artist Faith Coyotë
User avatar
Sniper_E
Registered User
Posts: 1136
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: [RC] Smilie Signs

Post by Sniper_E »

You know... I should make that into a popup window like the "more smilies" popup.

Instead of using the selection dropdown menu like it is now, have a button that pulls up all of the smilie sign images in a window and when you click on one it enters it into the textarea box. :idea:

You can create a popup link for viewing those smilie sign images for your users like this.

Code: Select all

<a onclick="popup('./ext/sniper/smiliesigns/images/', 800, 600); return false;" value="Smilie Signs; return false;">Smilie Signs</a>
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
User avatar
Puchahawa
Registered User
Posts: 769
Joined: Sat Jan 01, 2011 10:33 pm
Name: Randy

Re: [RC] Smilie Signs

Post by Puchahawa »

That sounds like a great idea. Where would I put that code?
Avatar courtesy of artist Faith Coyotë
User avatar
Sniper_E
Registered User
Posts: 1136
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: [RC] Smilie Signs

Post by Sniper_E »

Shoot I don't know where you would want to put that link to the smilie sign images.
Where your members can click on it. The navbar_header.html... Dunno.

When I get back home I'll look and see if I can set it in that selection dropdown.
I'll let you know what I come up with. I may go ahead and write that popup.
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
User avatar
Sniper_E
Registered User
Posts: 1136
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: [RC] Smilie Signs

Post by Sniper_E »

Puchahawa wrote:That sounds like a great idea. Where would I put that code?
Try putting that link to your smilie sign images beside the selection box. See if this will work for you.

Open ext/smiliesigns/styles/all/template/smiliesigns_posting_editr_button.html
At the bottom of that template Find

Code: Select all

	</select>
After Add

Code: Select all

	<a href="./ext/sniper/smiliesigns/images/" onclick="popup('./ext/sniper/smiliesigns/images/', 800, 600); return false;" value="Smilie Signs; return false;"><img src="./ext/sniper/smiliesigns/styles/all/theme/images/{L_THIS}.gif" atl="" style="height: 21px;vertical-align: middle" /></a>
Upload your changes and clear the cache.
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
User avatar
Puchahawa
Registered User
Posts: 769
Joined: Sat Jan 01, 2011 10:33 pm
Name: Randy

Re: [RC] Smilie Signs

Post by Puchahawa »

Checking on my test board running 3.1.6 on wampserver. It's working kind of. :lol: The link (smilie) is next to the selection box as desired. The outcome I'm not sure of. Is that what your expecting?

Image
Avatar courtesy of artist Faith Coyotë
User avatar
Sniper_E
Registered User
Posts: 1136
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: [RC] Smilie Signs

Post by Sniper_E »

No, you should see the images. Like THIS but in a popup window.
You need to put that index.php file I sent you in that directory with the images.
Last edited by Sniper_E on Sat Oct 17, 2015 10:51 pm, edited 1 time in total.
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
User avatar
Sniper_E
Registered User
Posts: 1136
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: [RC] Smilie Signs

Post by Sniper_E »

double post
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
User avatar
Puchahawa
Registered User
Posts: 769
Joined: Sat Jan 01, 2011 10:33 pm
Name: Randy

Re: [RC] Smilie Signs

Post by Puchahawa »

Opps. Did some testing on my live board with that file and forgot to add it to the test for this.

This is what shows at the moment with the index.php file added to the images folder of the ext. cache purged.

Code: Select all

**************************************************************************** Changelog: v1.2.5	11-26-03 security fix: download would allow paths above snif directory v1.2.4	11-16-03 added configurable separation string for description files added option to use external icons v1.2.3	11-15-03 fixed minor typos and HTML glitches v1.2.2	11-11-03 fixed a bug where the current path wasn't properly shown in the heading v1.2.1	11-10-03 fixed files without extension suppressed warning when io functions fail experimental handling of symbolic links (completely untested! Please give feedback.) v1.2	11-04-03 put a simple file into subdirectories to have snif handle direct requests to them minor bugfix v1.1a 11-03-03 file download for Opera fixed v1.1	11-03-03 download files instead of opening better documentation code cleanup v1.0 10-19-03 initial release **************************************************************************** ** DESCRIPTION FILE FORMAT ** **************************************************************************** Hardcore definition: ::= * ::= ::= + ::= defined by the $separationString variable, default \t ::= + ::= "\r\n" | "\n"	// OS dependent Simple example: .	This directory contains downloadable files for MyProgram 12.0. myprogram_12.0.exe	Installer version of MyProgram 12.0 (recommended) myprogram_12.0.zip	Zip file distribution of MyProgram 12.0 releasenotes.txt	Release notes for MyProgram 12.0 Please note that the room between the filename and the description is not filled with multiple spaces, but with one single tab. It doesn't matter if the descriptions in a file align or not, just use one tab. If you use a description for the current directory (.) as in the first line in the above example, it will be used as a heading in the directory listing. Put your descriptions in a text file within the same directory as the files to describe. Then put the text file's name in the $useDescriptionsFrom variable below. It is suggested that you use the same description file name in all subdirectories you want to list. Reason: Read the next paragraph. **************************************************************************** ** HANDLING SUBDIRECTORY LISTINGS ** **************************************************************************** Say you've put the snif index.php into www.yourhost.com/download. Now somebody makes a request to www.yourhost.com/download/releases. In order to deal with this properly, you would have to copy the snif index.php to that directory, too. But this will prevent the user to go to www.yourhost.com/download from www.yourhost.com/download/releases directly by selecting the .. link. If you have this situation, use the index.php file from the subdirectory called "subdir" in the snif archive file. All it does is automatically forward the user to the parent directory and set URL parameters so that the real snif will handle the request. OK, that may be confusing. Again, a simple example: /download/descript.ion << descriptions for /download/*.* /download/index.php << this file you're reading now, >18 KB /download/license.txt /download/notes.txt /download/releases/bigprogram_2.0.zip /download/releases/descript.ion << descriptions for /download/releases/*.* /download/releases/index.php << subdir/index.php, <2 KB /download/releases/nightly/2.1_20031103.zip /download/releases/nightly/2.1_20031104.zip /download/releases/nightly/index.php << subdir/index.php, <2 KB If a users points his browser to www.yourhost.com/download/releases/nightly/ The small index.php will forward him to www.yourhost.com/download/releases/?path=nightly/ And then the index file in that directory will forward him again, this time to www.yourhost.com/download/?path=releases/nightly/ Now we've reached the directory with the real snif (should get a copyright on that phrase ;-)), which will take over and miraculously lists the directory the user typed as an URL. /***************************************************************************/ /** SET YOUR CONFIGURATION HERE **/ /***************************************************************************/ /** * Specify which files should be hidden in the file listing using * unix/DOS wildcards (? and *). * This is case insensitive. This script, the current directory and the * description file will automatically be hidden. **/ $hiddenFilesWildcards = Array("*.php",".bash*",".emacs","private","wood.gif","wood.jpg","wood_pole_top.gif"); /** * description file, leave blank for no descriptions **/ $useDescriptionsFrom = "descript.ion"; /** * show sub directories and let the user change to them * It will be impossible to go above the directory this script is in. **/ $allowSubDirs = true; /** * Allow the users to download .php files. This will expose the full contents * of the downloaded files (including password used in it). Be careful * with this! * This only makes sense if you don't hide all .php files. **/ $allowPHPDownloads = false; /** * Define the string that should be used to separate file names and * descriptions in the description files. Defaults to "\t" (tab). **/ $separationString = "\t"; /** * Use external images instead of built-in ones. If you set this to * true, you'll have to specify each of the $iconForXXX variables below. **/ $useExternalImages = false; /** * State the filenames for external file icons. Only used if * $useExternalImages == true. Paths are relative to the directory of snif. * Icon size should be 16x16 pixels. **/ $externalIcons = Array ( "text"	=> "", "image"	=> "", "binary"	=> "", "folder"	=> "", "html"	=> "", "unknown"	=> "" ); /***************************************************************************/ /** REAL CODE STARTS HERE **/ /***************************************************************************/ // default sorting is by name if ($_GET["sort"]=="") $_GET["sort"] = "name"; // default order is ascending if ($_GET["order"]=="") $_GET["order"] = "asc"; // add files used by snif to hidden file list $hiddenFilesWildcards[] = $useDescriptionsFrom; $hiddenFilesWildcards[] = "."; $hiddenFilesWildcards[] = basename($_SERVER["PHP_SELF"]); // first of all, security: prevent any unauthorized paths // if sub directories are forbidden, ignore any path setting if (!$allowSubDirs) { $path = ""; } else { $path = $_GET["path"]; // ignore any potentially malicious paths $path = safeDirectory($path); } // handle image requests if ($_GET["getimage"]!="") { Header("Content-Type: image/gif"); Header("Expires: ".date("r",time()+3600)); switch ($_GET["getimage"]) { case "asc":	echo base64_decode("R0lGODlhBQADAIABAN3d3f///yH5BAEAAAEALAAAAAAFAAMAAAIFTGAHuF0AOw=="); break; case "binary":	echo base64_decode("R0lGODlhEAAQAJECAAAAAP///////wAAACH5BAEAAAIALAAAAAAQABAAAAI0lICZxgYBY0DNyfhAfROrxoVQBo5mpzFih5bsFLoX5iLYWK6xyur5ubPAbhPZrKhSKCmCAgA7"); break; case "desc":	echo base64_decode("R0lGODlhBQADAIABAN3d3f///yH5BAEAAAEALAAAAAAFAAMAAAIFhB0XC1sAOw=="); break; case "folder":	echo base64_decode("R0lGODlhEAAQAJECAAAAAP///////wAAACH5BAEAAAIALAAAAAAQABAAAAIplI+JwKAJggzuiThl2wbnT3UgWHmjJp5Tqa5py7bhJc/mWW46Z/V+UgAAOw=="); break; case "html":	echo base64_decode("R0lGODlhEAAQAKIHABsb/2ho/4CA/0BA/zY2/wAAAP///////yH5BAEAAAcALAAAAAAQABAAAANEeFfcrVAVQ6thUdo6S57b9UBgSHmkyUWlMAzCmlKxAZ9s5Q5AjWqGwIAS8OVsNYJxJgDwXrHfQoVLEa7Y6+Wokjq+owQAOw=="); break; case "image":	echo base64_decode("R0lGODlhEAAQAKIEAK6urmRkZAAAAP///////wAAAAAAAAAAACH5BAEAAAQALAAAAAAQABAAAANCSCTcrVCJQetgUdo6RZ7b9UBgSHnkAKwscEZTy74pG9zuBavA7dOanu+H0gyGxN0RGdClKEjgwvKTlkzFhWOLISQAADs="); break; case "text":	echo base64_decode("R0lGODlhEAAQAJECAAAAAP///////wAAACH5BAEAAAIALAAAAAAQABAAAAI0lICZxgYBY0DNyfhAfXcuxnWQBnoKMjXZ6qUlFroWLJHzGNtHnat87cOhRkGRbGc8npakAgA7"); break; case "download":	echo base64_decode("R0lGODlhBwAQAIABAAAAAP///yH5BAEAAAEALAAAAAAHABAAAAISjI+pywb6UkQzgHsPls3h2gUFADs="); break; case "blank":	echo base64_decode("R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="); break; case "unknown":	echo base64_decode("R0lGODlhEAAQAJECAAAAAP///////wAAACH5BAEAAAIALAAAAAAQABAAAAI1lICZxgYBY0DNyfhAfXcuxnkI1nCjB2lgappld6qWdE4vFtprR+4sffv1ZjwdkSc7KJYUQQEAOw=="); break; } die(); } // handle download requests if ($_GET["download"]!="") { $filename = safeDirectory($path.$_GET["download"]); if ( !file_exists($filename) OR fileIsHidden($filename) OR (substr(strtolower($filename), -4)==".php" AND !$allowPHPDownloads)) { Header("HTTP/1.0 404 Not Found"); echo "Error: File not found.

we suggest you go back"; } else { Header("Content-Length: ".filesize($filename)); Header("Content-Type: application/x-download"); Header("Content-Disposition: attachment; filename=".$_GET["download"]); readfile($filename); } die(); } function safeDirectory($path) { $result = $path; if (strpos($path,"..")!==false) $result = ""; if (substr($path,0,1)=="/") { $result = ""; } return $result; } /** * Formats a file's size nicely (750 B, 3.4 KB etc.) **/ function niceSize($size) { static $sizeUnits = Array(" B","KB","MB","GB","TB"); define("SIZESTEP", 1024.0); if ($size=="") return ""; $unitIndex = 0; while ($size>SIZESTEP) { $size = $size / SIZESTEP; $unitIndex++; } if ($unitIndex==0) { return number_format($size, 0)." ".$sizeUnits[$unitIndex]; } else { return number_format($size, 1, ".", ",")." ".$sizeUnits[$unitIndex]; } } /** * Compare two strings or numbers. Return values as strcmp(). **/ function myCompare($arrA, $arrB, $caseSensitive=false) { $a = $arrA[$_GET["sort"]]; $b = $arrB[$_GET["sort"]]; // sort directories above everything else if ($arrA["isDirectory"]!=$arrB["isDirectory"]) { $result = $arrB["isDirectory"]-$arrA["isDirectory"]; } else if ( $arrA["isDirectory"] && $arrB["isDirectory"] && ($_GET["sort"]=="type" || $_GET["sort"]=="size")) { $result = 0; } else { if (is_string($a) OR is_string($b)) { if (!$caseSensitive) { $a = strtoupper($a); $b = strtoupper($b); } $result = strcoll($a,$b); } else { $result = $a-$b; } } if (strtolower($_GET["order"])=="desc") { return -$result; } else { return $result; } } /** * Build a URL using new sorting settings. **/ function getNewSortURL($newSort) { GLOBAL $path; $base = $_SERVER["PHP_SELF"]; $url = $base."?sort=$newSort"; if ($newSort==$_GET["sort"]) { if ($_GET["order"]=="asc" OR $_GET["order"]=="") { $url.= "&order=desc"; } } if ($path!="") { $url.= "&path=$path"; } return $url; } /** * Determine a file's file type based on its extension. **/ function getFileType($extension, $isDir) { // put any additional extensions in here static $fileTypes = Array( "html"	=> Array("html","htm"), "image"	=> Array("gif","jpg","jpeg","png","JPG"), "text"	=> Array("asp","c","cpp","css","h","ini","java","php","phps","rdf","rss","txt","xml"), "binary"	=> Array("ace","avi","bin","class","doc","exe","gz","jar","mov","mpg","mpeg","mp3","ogg","pdf","rar","rm","swf","tar","tgz","zip") ); static $extensions = null; if ($extensions==null) { $extensions = Array(); foreach($fileTypes AS $keyType => $value) { foreach($value AS $ext) $extensions[$ext] = $keyType; } } if ($isDir) return "folder"; $type = $extensions[$extension]; if ($type=="") { return "unknown"; } else { return $type; } } function getIcon($fileType) { GLOBAL $useExternalImages, $externalIcons; if ($useExternalImages) { return $externalIcons[$fileType]; } else { return $_SERVER["PHP_SELF"]."?getimage=$fileType"; } } // checks if a file is hidden from view function fileIsHidden($filename) { GLOBAL $hiddenFilesWildcards; static $hiddenFilesWholeRegex; if (empty($hiddenFilesWholeRegex)) { $hiddenFilesRegex = Array(); for ($i=0;$iread()) { // if the filename matches one of the hidden files wildcards, skip the file if (fileIsHidden($entry)) continue; // if the file is a directory and if directories are forbidden, skip it if (!$allowSubDirs AND is_dir($entry)) continue; $f = Array(); $f["name"] = $entry; $f["isDownloadable"] = (substr(strtolower($entry), -4)!=".php") || $allowPHPDownloads; $f["isDirectory"] = is_dir($entry); $f["date"] = @filemtime($entry); if (is_dir($entry)) { $f["type"] = "<DIR>"; // building the link if ($entry=="..") { // strip the last directory from the path $pathArr = explode("/",$path); $link = implode("/",array_slice($pathArr,0,count($pathArr)-2)); // if there is no path set, don't add it to the link if ($link=="") { // we're already in $baseDir, so skip the file if ($path=="") continue; $f["link"] = $_SERVER["PHP_SELF"]; } else { $link.= "/"; $f["link"] = $_SERVER["PHP_SELF"]."?path=".$link; } } else { $f["link"] = $_SERVER["PHP_SELF"]."?path=".$path.$entry."/"; } } else { if (is_link($entry)) { $linkTarget = readlink($entry); $pi = pathinfo($linkTarget); $scriptDir = dirname($_SERVER["SCRIPT_FILENAME"]); if (strpos($pi["dirname"], $scriptDir)===0) { $f["type"] = "<LINK>"; // links have no date, so take the target's date $f["date"] = filemtime($linkTarget); $f["link"] = $path.substr($linkTarget, strlen($scriptDir)+1); } else { // link target is outside of script directory, so skip it continue; } } else { $f["size"] = @filesize($entry); $pi = pathinfo($entry); $f["type"] = $pi["extension"]; $f["link"] = $path.$entry; } } $f["filetype"] = getFileType($f["type"], is_dir($entry)); $f["icon"] = getIcon($f["filetype"]); $f["description"] = $descriptions[$entry]; $files[] = $f; } usort($files, "myCompare"); $columns = 4; if ($useDescriptionsFrom!="") $columns++; ?>
" title="">" alt="" />
Last edited by Puchahawa on Sat Oct 17, 2015 11:57 pm, edited 2 times in total.
Avatar courtesy of artist Faith Coyotë
User avatar
Puchahawa
Registered User
Posts: 769
Joined: Sat Jan 01, 2011 10:33 pm
Name: Randy

Re: [RC] Smilie Signs

Post by Puchahawa »

Well... gotta be something foolish I did on the test board. I added it to the live board and works as you designed it. :lol:

Appreciate your time and patience. Keep up the good work.
Avatar courtesy of artist Faith Coyotë
HeinrichP
Registered User
Posts: 28
Joined: Wed Oct 14, 2015 8:15 pm

Re: [RC] Smilie Signs

Post by HeinrichP »

great extention, thanks :D

the popup shows tekst only with me too ...
any idea what to do?

edit: fixed, I see the smilies, but clicking a smilie it don't show up in mchat

btw: in firefox I see the smilies in the scroll, but in chrome I don't
User avatar
[email protected]
Registered User
Posts: 191
Joined: Sun Sep 15, 2013 11:49 am
Location: bb3.mobi
Name: Anvar Stybaev
Contact:

Re: [RC] Smilie Signs

Post by [email protected] »

Open /ext/sniper/smiliesigns/styles/all/template/smiliesigns_posting_editor_button.html

Replace all

Code: Select all

	<select class="gensmall" name="smiliesign" onchange="wood_preview(this);" style="height: 21px;">
			<option value="#" selected="selected" style="display: none;">{L_SIGN_BBODES}</option>
			<option value="{L_ACUTE}]" class="{L_ACUTE}">{L_ACUTE_TITLE}</option>
			<option value="{L_AIKIDO}]" class="{L_AIKIDO}">{L_AIKIDO_TITLE}</option>
			<option value="{L_BANANAS}]" class="{L_BANANAS}">{L_BANANAS_TITLE}</option>
			<option value="{L_BANGHEAD}]" class="{L_BANGHEAD}">{L_BANGHEAD_TITLE}</option>
			<option value="{L_BDAYCAKE}]" class="{L_BDAYCAKE}">{L_BDAYCAKE_TITLE}</option>
			<option value="{L_BDAYCANDLE}]" class="{L_BDAYCANDLE}">{L_BDAYCANDLE_TITLE}</option>
			<option value="{L_BEER}]" class="{L_BEER}">{L_BEER_TITLE}</option>
			<option value="{L_BEG}]" class="{L_BEG}">{L_BEG_TITLE}</option>
			<option value="{L_BEACH}]" class="{L_BEACH}">{L_BEACH_TITLE}</option>
			<option value="{L_BIG_BOSS}]" class="{L_BIG_BOSS}">{L_BIG_BOSS_TITLE}</option>
			<option value="{L_BLACKEYE}]" class="{L_BLACKEYE}">{L_BLACKEYE_TITLE}</option>
			<option value="{L_BLAHBLAH}]" class="{L_BLAHBLAH}">{L_BLAHBLAH_TITLE}</option>
			<option value="{L_BLUSH}]" class="{L_BLUSH}">{L_BLUSH_TITLE}</option>
			<option value="{L_BORG_DRONE}]" class="{L_BORG_DRONE}">{L_BORG_DRONE_TITLE}</option>
			<option value="{L_BYEBYE}]" class="{L_BYEBYE}">{L_BYEBYE_TITLE}</option>
			<option value="{L_CHEERS}]" class="{L_CHEERS}">{L_CHEERS_TITLE}</option>
			<option value="{L_CLAPPING}]" class="{L_CLAPPING}">{L_CLAPPING_TITLE}</option>
			<option value="{L_CLUB}]" class="{L_CLUB}">{L_CLUB_TITLE}</option>
			<option value="{L_COFFEE}]" class="{L_COFFEE}">{L_COFFEE_TITLE}</option>
			<option value="{L_COOL}]" class="{L_COOL}">{L_COOL_TITLE}</option>
			<option value="{L_COOL2}]" class="{L_COOL2}">{L_COOL2_TITLE}</option>
			<option value="{L_CRAP}]" class="{L_CRAP}">{L_CRAP_TITLE}</option>
			<option value="{L_CRAZY}]" class="{L_CRAZY}">{L_CRAZY_TITLE}</option>
			<option value="{L_CRY}]" class="{L_CRY}">{L_CRY_TITLE}</option>
			<option value="{L_CRYBYE}]" class="{L_CRYBYE}">{L_CRYBYE_TITLE}</option>
			<option value="{L_DOH}]" class="{L_DOH}">{L_DOH_TITLE}</option>
			<option value="{L_FOCUS}]" class="{L_FOCUS}">{L_FOCUS_TITLE}</option>
			<option value="{L_FRIENDS}]" class="{L_FRIENDS}">{L_FRIENDS_TITLE}</option>
			<option value="{L_FRIGHT}]" class="{L_FRIGHT}">{L_FRIGHT_TITLE}</option>
			<option value="{L_GIVE_HEART}]" class="{L_GIVE_HEART}">{L_GIVE_HEART_TITLE}</option>
			<option value="{L_GIVE_ROSE}]" class="{L_GIVE_ROSE}">{L_GIVE_ROSE_TITLE}</option>
			<option value="{L_GOOD}]" class="{L_GOOD}">{L_GOOD_TITLE}</option>
			<option value="{L_GRIN}]" class="{L_GRIN}">{L_GRIN_TITLE}</option>
			<option value="{L_HOWDY}]" class="{L_HOWDY}">{L_HOWDY_TITLE}</option>
			<option value="{L_IDK}]" class="{L_IDK}">{L_IDK_TITLE}</option>
			<option value="{L_JAW}]" class="{L_JAW}">{L_JAW_TITLE}</option>
			<option value="{L_KING}]" class="{L_KING}">{L_KING_TITLE}</option>
			<option value="{L_LOL}]" class="{L_LOL}">{L_LOL_TITLE}</option>
			<option value="{L_MAD}]" class="{L_MAD}">{L_MAD_TITLE}</option>
			<option value="{L_MEXWAVE}]" class="{L_MEXWAVE}">{L_MEXWAVE_TITLE}</option>
			<option value="{L_MOON}]" class="{L_MOON}">{L_MOON_TITLE}</option>
			<option value="{L_NONO}]" class="{L_NONO}">{L_NONO_TITLE}</option>
			<option value="{L_OK}]" class="{L_OK}">{L_OK_TITLE}</option>
			<option value="{L_ORDER}]" class="{L_ORDER}">{L_ORDER_TITLE}</option>
			<option value="{L_PARDON}]" class="{L_PARDON}">{L_PARDON_TITLE}</option>
			<option value="{L_POKE}]" class="{L_POKE}">{L_POKE_TITLE}</option>
			<option value="{L_PUMP}]" class="{L_PUMP}">{L_PUMP_TITLE}</option>
			<option value="{L_READ}]" class="{L_READ}">{L_READ_TITLE}</option>
			<option value="{L_ROFL}]" class="{L_ROFL}">{L_ROFL_TITLE}</option>
			<option value="{L_ROLLEYES}]" class="{L_ROLLEYES}">{L_ROLLEYES_TITLE}</option>
			<option value="{L_ROTFL}]" class="{L_ROTFL}">{L_ROTFL_TITLE}</option>
			<option value="{L_RULES2}]" class="{L_RULES2}">{L_RULES2_TITLE}</option>
			<option value="{L_SCARED}]" class="{L_SCARED}">{L_SCARED_TITLE}</option>
			<option value="{L_SCOUT}]" class="{L_SCOUT}">{L_SCOUT_TITLE}</option>
			<option value="{L_SCRATCH}]" class="{L_SCRATCH}">{L_SCRATCH_TITLE}</option>
			<option value="{L_SEARCH2}]" class="{L_SEARCH2}">{L_SEARCH2_TITLE}</option>
			<option value="{L_SECRET}]" class="{L_SECRET}">{L_SECRET_TITLE}</option>
			<option value="{L_SHOCK}]" class="{L_SHOCK}">{L_SHOCK_TITLE}</option>
			<option value="{L_SHOUT}]" class="{L_SHOUT}">{L_SHOUT_TITLE}</option>
			<option value="{L_SLEEPING}]" class="{L_SLEEPING}">{L_SLEEPING_TITLE}</option>
			<option value="{L_SORRY}]" class="{L_SORRY}">{L_SORRY_TITLE}</option>
			<option value="{L_TAUNT}]" class="{L_TAUNT}">{L_TAUNT_TITLE}</option>
			<option value="{L_TEASE}]" class="{L_TEASE}">{L_TEASE_TITLE}</option>
			<option value="{L_THINK}]" class="{L_THINK}">{L_THINK_TITLE}</option>
			<option value="{L_THIS}]" class="{L_THIS}">{L_THIS_TITLE}</option>
			<option value="{L_TONGUE}]" class="{L_TONGUE}">{L_TONGUE_TITLE}</option>
			<option value="{L_UNSURE}]" class="{L_UNSURE}">{L_UNSURE_TITLE}</option>
			<option value="{L_WACKO}]" class="{L_WACKO}">{L_WACKO_TITLE}</option>
			<option value="{L_WAVE}]" class="{L_WAVE}">{L_WAVE_TITLE}</option>
			<option value="{L_WARNING}]" class="{L_WARNING}">{L_WARNING_TITLE}</option>
			<option value="{L_WEIRDO}]" class="{L_WEIRDO}">{L_WEIRDO_TITLE}</option>
			<option value="{L_WINK}]" class="{L_WINK}">{L_WINK_TITLE}</option>
			<option value="{L_YAHOO}]" class="{L_YAHOO}">{L_YAHOO_TITLE}</option>
			<option value="{L_YES2}]" class="{L_YES2}">{L_YES2_TITLE}</option>
			<option value="{L_ZCHAIR}]" class="{L_ZCHAIR}">{L_ZCHAIR_TITLE}</option>
	</select>
<span id="wood_preview"></span>
<script type="text/javascript">
function wood_preview(element) {
	var wood_preview = document.getElementById('wood_preview');
	wood_preview.innerHTML = '<div class="column1"><h3>{L_PREVIEW}</h3><table id="img_wood" width="100%"><tr><td align="center"><div><img src="{BOARD_URL}ext/sniper/smiliesigns/images/wood_pole_top.gif" alt="" style="margin-bottom: -5px;" /></div><table><tr><td><div style="background: #A14500 url({BOARD_URL}ext/sniper/smiliesigns/images/wood.gif);padding: 6px;margin: 0;border: 1px solid #000000;-webkit-border-radius: 22px;-o-border-radius: 22px;-moz-border-radius: 22px;border-radius: 22px;"><div class="signs" style="background: #CE9546 url({BOARD_URL}ext/sniper/smiliesigns/images/wood.jpg);color: #211200;font-size: 1em;font-weight: bold;text-align: left;padding: 10px;margin: 0;border: 1px solid #522601;-webkit-border-radius: 20px;-o-border-radius: 20px;-moz-border-radius: 20px;border-radius: 20px;"><span id="wood_text"></span></div></div></td></tr></table><div><img src="{BOARD_URL}ext/sniper/smiliesigns/images/wood_pole_' + element.value.replace("]","") + '.gif" alt="" style="margin-top: -1px;" /></div></td><td><p>{L_BBCODE_SIGN_HELP}</p><a class="button">{L_PLACE_INLINE}</a></td></tr></table></div><div class="column2"><textarea id="input_wood_text" class="inputbox autowidth"></textarea></div>';
	if (element.value && element.value != '#') {
		var input_wood_text = document.getElementById('input_wood_text');
		document.getElementById('format-buttons').appendChild(wood_preview);
		document.getElementById('img_wood').onclick = function() {
			bbfontstyle('[sign=' + element.value + '' + input_wood_text.value + '', '[/sign]');
		};
		input_wood_text.oninput = function() {
			document.getElementById('wood_text').innerHTML = input_wood_text.value;
		};
	}
	else {
		wood_preview.innerHTML = '';
	}
}
</script>
Result:
Image
Last edited by [email protected] on Thu Nov 19, 2015 2:15 pm, edited 1 time in total.
[DEV/Beta] More extensions

Hopefully Google correctly translate my text// I do not support in private messages!
HeinrichP
Registered User
Posts: 28
Joined: Wed Oct 14, 2015 8:15 pm

Re: [RC] Smilie Signs

Post by HeinrichP »

Open /ext/sniper/smiliesigns/styles/all/template/event/smiliesigns_posting_editor_button.html
should be Open /ext/sniper/smiliesigns/styles/all/template/smiliesigns_posting_editor_button.html I think?

This looks great and much better Anvar, thanks!

but when I click on the button "place inline" nothing happens yet ...
Post Reply

Return to “Extensions in Development”