View Single Post
  #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