Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Torrent Strike
Reply
  #1  
Old 13th January 2010, 19:40
wigaer wigaer is offline
Member
 
Join Date: Jun 2009
Romania
Posts: 2
Default [More Smilies] for shoutbox
Hello to all!
I want to add [More Smilies] in the shoutbox and not really succeed .... in global.php i found:

Code:
function winop()
{
windop = window.open("moresmiles.php?form=<?=$form?>&text=<?=$text?>","mywin","height=500,width=450,resizable=no,scrollbars=yes");
}
and I added in index.php :

Code:
<a href="javascript:winop();">More Smiles</a>
but not work when I click on it.
in "Add a full comment" on the torrent works perfectly

mention that i using "Torrent Strike Fully Modded" source.


__________________________________________________ ____________________________
Edit after one day:

In index.php i added:
Code:
<script>
function winop()
{
windop = window.open("shout_smilies.php?form=<?=$form?>&text=<?=$text?>","mywin","height=500,width=450,resizable=no,scrollbars=yes");
}
</script>
<a href="javascript:winop();">More Smiles</a>

I added the emoticon in the database in "shoutbox_emoticons" and now window appears when I click on "More Smiles" but nothing appears in "Message:" when I click on the emoticon.


This is my shout_smilies.php
Code:
<?
require_once("include/bittorrent.php");
require_once('include/config.php');
?>

<HTML>
<HEAD>
<TITLE>Insert Smilie</TITLE>
<SCRIPT Language="JavaScript">
<!--

function InsertSmilie(texttoins)
{
window.opener.document.shoutform.message.value = window.opener.document.shoutform.message.value+' '+texttoins+' ';
window.opener.document.shoutform.message.focus();
window.close();
}



//-->
</SCRIPT>


<script type="text/javascript">

window.google_analytics_uacct = "UA-3186736-1";


</script>
</HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#800000" ALINK="#FF00FF">
<?
dbconn(false);

$query = 'SELECT * FROM shoutbox_emoticons GROUP BY image';

$result = mysql_query($query);
$alt = false;

while ($row = mysql_fetch_assoc($result)) {

echo "
<img src='".$SITEURL."./images/shoutbox/".$row['image']."' onClick=\"InsertSmilie('".$row['text']."');\">";

}
?>

<script type="text/javascript"><!--
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
//-->
</script>
<script type="text/javascript"><!--
try {
var pageTracker = _gat._getTracker("UA-3186736-1");
pageTracker._trackPageview();
} catch(err) {}
//-->
</script>
</BODY>
</HTML>
When i go with mouse on the emoticon, arrow from my mouse should transform into a litle hand and should appear below the window of firefox something like this: "javascript:InsertSmilie(xxxx,xxxx)" but there is nothing and arrow remains the same.

Last edited by wigaer; 14th January 2010 at 19:11.
Reply With Quote
  #2  
Old 20th June 2011, 19:39
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Post button
button for more smilys
for shoutbox.php

after
PHP Code:
require('ts_shoutbox/ts_shoutbox.php');
$shoutbox $SHOUTBOXCONTENTS;
$shoutbox .= '
                <br /> 
ADD

PHP Code:
    <input type="button" value="'.$lang->global['shoutmoresmilies'].'" alt="'.$lang->global['shoutmoresmilies'].'" title="'.$lang->global['shoutmoresmilies'].'" onclick="window.open(\''.$BASEURL.'/moresmiles.php\'); return false;" class="button"
moresmiles.php

PHP Code:
<?
/***********************************************/
/*=========[TS Special Edition v.5.6]==========*/
/*=============[Special Thanks To]=============*/
/*        DrNet - wWw.SpecialCoders.CoM        */
/*          Vinson - wWw.Decode4u.CoM          */
/*    MrDecoder - wWw.Fearless-Releases.CoM    */
/*           Fynnon - wWw.BvList.CoM           */
/***********************************************/


  
require_once 'global.php';
  if (!
defined ('IN_SCRIPT_TSSEv56'))
  {
    exit (
'<font face=\'verdana\' size=\'2\' color=\'darkred\'><b>Error!</b> Direct initialization of this file is not allowed.</font>');
  }

  
define ('MS_VERSION''0.5');
  
gzip ();
  
dbconn ();
  
loggedinorreturn ();
  
maxsysop ();
  
parked ();
  require_once 
$rootpath '/' $cache '/smilies.php';
  
$defaultsmilies $smilies;
  
$smilies '';
  
$editor htmlspecialchars ($_GET['editor']);
  
$e 1;
  
$class 'trow1';
  
$smilies '<tr>';
  while (list (
$code$url) = each ($defaultsmilies))
  {
    
$url addslashes ($url);
    
$url htmlspecialchars_uni ($url);
    
$smilies .= '' '
    <td class="' 
$class '" align="center"><img src="' $BASEURL '/' $pic_base_url 'smilies/' $url '" alt="' $code '" onclick="insertSmilie(\'' $code '\');" style="cursor: pointer;" /></a></td>
    <td class="' 
$class '">' $code '</td>';
    if (
$e == 2)
    {
      
$smilies .= '</tr><tr>';
      
$e 1;
      continue;
    }
    else
    {
      
$e 2;
      continue;
    }
  }

  if (
$e == 2)
  {
    
$smilies .= '' '<td colspan="2" class="' $class '">&nbsp;</td>';
  }

  
$str '
<script type="text/javascript" src="' 
$BASEURL '/scripts/prototype.lite.js?v=' O_SCRIPT_VERSION '"></script>
<script type="text/javascript" src="' 
$BASEURL '/scripts/general.js?v=' O_SCRIPT_VERSION '"></script>
<script type="text/javascript" src="' 
$BASEURL '/scripts/editor.js?v=' O_SCRIPT_VERSION '"></script>';
  
$norightclick '
<script language=javascript>
<!--
var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// -->
</script>'
;
  
$defaulttemplate ts_template ();
  echo 
'' '
<html>
<head>
<title>' 
$SITENAME ' - ' $lang->global['smilies_listing'] . '</title>

<script type="text/javascript">
    var editor = eval(\'opener.\' + \'' 
$editor '\');
    function insertSmilie(code)
    {
        if(editor)
        {
            editor.performInsert(code, "", true, false);
        }
    }
</script>
$str '
<link rel="stylesheet" href="' 
$BASEURL '/include/templates/' $defaulttemplate '/style/style.css" type="text/css" media="screen" />
</head>
<body>
$norightclick '
<table border="0" cellspacing="1" cellpadding="4" class="tborder">
<tr>
<td class="thead" colspan="4"><strong>' 
$lang->global['smilies_listing'] . '</strong></td>
</tr>
<tr>
<td class="tcat" colspan="4"><span class="smalltext">' 
$lang->global['click_to_add'] . '</span></td>
</tr>
$smilies '
<tr>
<td class="thead" colspan="4" align="center"><span class="smalltext">[<a href="javascript:window.close();">' 
$lang->global['buttonclosewindow'] . '</a>]</span></td>
</tr>
</table>
</body>
</html>'
;
?>

Last edited by wMan; 20th June 2011 at 22:16.
Reply With Quote
Reply

Tags
shoutbox , smilies

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Make "More Smilies" and "Help" on FTS shoutbox a clickable link benjaminbih Mods & Themes 1 22nd December 2009 07:22
Smilies Fynnon Downloads 5 18th December 2009 23:52
More Smilies C2DaJ Template Shares 0 4th October 2009 03:52
Smilies rulebreaker Template Shares 5 6th March 2009 15:30
Ts 5.1 smilies in a chat zenja7777 Template Shares 0 10th August 2008 16:29



All times are GMT +2. The time now is 23:45. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.