Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 smile manager plus
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

thelodger
Junior Member

United Kingdom
296 Posts

Posted - 24 March 2009 :  15:37:34  Show Profile
Hi guys, I am re-adding all my mods to the new updated forum, most are going along fine considering that I dont have a clue about website stuff!
Anyway all is fine other than one file in this mod

I am told to add stuff to inc_smiles.asp
All the code between
'############# SmileManager Plus MOD ################
XXX
'####################################################
This is the finished version, or what it is to look like
Response.Write "                      <script language=""Javascript"" type=""text/javascript"">" & vbNewLine & _
      "                      <!-- hide" & vbNewLine & _
        "                      function insertsmilie(smilieface) {" & vbNewLine & _
      "                          if (document.PostTopic.Message.createTextRange && document.PostTopic.Message.caretPos) {" & vbNewLine & _
      "                             var caretPos = document.PostTopic.Message.caretPos;" & vbNewLine & _
      "                             caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? smilieface + ' ' : smilieface;" & vbNewLine & _
      "                             document.PostTopic.Message.focus();" & vbNewLine & _
      "                          } else {" & vbNewLine & _
      "                             document.PostTopic.Message.value+=smilieface;" & vbNewLine & _
      "                             document.PostTopic.Message.focus();" & vbNewLine & _
      "                          }" & vbNewLine & _
      "                      }" & vbNewLine & _
      "                      // -->" & vbNewLine & _
      "                      </script>" & vbNewLine
'############# SmileManager Plus MOD ################ and remove &_ from the line above
response.write "                      <table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
            "                        <tr>" & vbNewLine & _
            "                          <td align=""center"" height=""20"" valign=""40""><a name=""smilies""></a><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><b>Smilies</b></font></td>" & vbNewLine & _
            "                        </tr>" & vbNewLine
' allow Member edits?
if MemberID <> -1 then
   strsql = "SELECT S2_AllowEdit FROM " & strTablePrefix & "SMILES2 WHERE S2_ID = 1"
   set aecheck = my_conn.execute(strsql)
   isae = aecheck("S2_AllowEdit")
   aecheck.close
   set aecheck = nothing
   if isae = 1 then
      allowedit = 1
      ' get Members Smile List
      strsql = "SELECT S_ID FROM " & strTablePrefix & "SMILES_CUSTOM WHERE MEMBER_ID = " & MemberID
      set mslist = my_conn.execute(strsql)
      thechecked = "|"
      if not(mslist.eof) then
         mslistdata = mslist.getrows
         mslistnumrows = ubound(mslistdata,2)
         mslist.close
         set mslist = nothing
         for mslisti = 0 to mslistnumrows
            thechecked = thechecked & mslistdata(0,mslisti) & "|"
         next
      else
         mslist.close
         set mslist = nothing
         thechecked = ""
      end if
   else
      allowedit = 0
      thechecked = ""
   end if
else
   allowedit = 0
   thechecked = ""
end if
if allowedit = 1 then
   response.write  "                <tr><td align=center><div style=""overflow:auto;height:100px;""><table cellspacing=0 cellpadding=2 border=0 width=""100%"">" & vbnewline
else
   response.write  "                <tr><td align=center><div style=""overflow:auto;height:120px;""><table cellspacing=0 cellpadding=2 border=0 width=""100%"">" & vbnewline
end if
if thechecked <> "" then
   strsql = "SELECT S_ID, S_CODE, S_URL, S_Colspan, S_DESC FROM " & strTablePrefix & "SMILES WHERE S_VISIBLE=1 AND S_ENABLED='yes' AND S_EXCLUDE = 0 ORDER BY S_DESC"
else
   strsql = "SELECT S_ID, S_CODE, S_URL, S_Colspan, S_DESC FROM " & strTablePrefix & "SMILES WHERE S_VISIBLE=1 AND S_ENABLED='yes' AND S_DEFAULT = 1 ORDER BY S_DESC"
end if
set srs = my_conn.execute(strsql)
if not(srs.eof) then
   srsdata=srs.getrows
   srsrows=ubound(srsdata,2)
   srs.close
   set srs = nothing
   smilecount = 0
   do until srsi > srsrows
      skipmovenext = 0
      if (thechecked <> "" AND instr(thechecked,"|" & srsdata(0,srsi) & "|") > 0) OR thechecked = "" then
         if smilecount >= 4 then
            response.write "</tr>"& vbnewline
            smilecount = 0
         end if
         if smilecount = 0 then
            response.write "<tr>"& vbnewline
         end if
         if srsdata(3,srsi) = 1 then
            response.write "  <td align=""center"" valign=""bottom""><a href=""javascript:insertsmilie('" & srsdata(1,srsi) & "')"" tabindex=""-1"">" & getCurrentIcon(srsdata(2,srsi) & "||",srsdata(4,srsi) & " " & srsdata(1,srsi),"") & "</a></td>"& vbnewline
            smilecount = smilecount + 1
         else
            if smilecount + srsdata(3,srsi) > 4 then
               skipmovenext = 1
               do until smilecount = 4
                  response.write "<td align=""center"" valign=""bottom""> </td>" & vbnewline
                  smilecount=smilecount + 1
               loop
            else
               response.write "  <td colspan=""" & srsdata(3,srsi) & """><a href=""javascript:insertsmilie('" & srsdata(1,srsi) & "')"" tabindex=""-1"">" & getCurrentIcon(srsdata(2,srsi) & "||",srsdata(4,srsi) & " " & srsdata(1,srsi),"") & "</a></td>"& vbnewline
               smilecount = smilecount + srsdata(3,srsi)
            end if
         end if
      end if
      if skipmovenext = 0 then
         srsi = srsi + 1
      end if
   Loop
   do until smilecount = 4
      response.write "<td> </td>" & vbnewline
      smilecount=smilecount + 1
   loop
   response.write "</tr>"
else
   srs.close
   set srs = nothing
   response.write("<tr><td colspan=3>No Smiles Found</td></tr>")
end if

response.write    "                 </table></div></td></tr>" & vbNewline
if allowedit = 1 then
   response.write    "                        <tr align=""center"">" & vbNewLine & _
                  "                          <td align=""center"" height=""20"" ><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><a href=""JavaScript:openWindow3('pop_members_smiles.asp')""><b>Edit Smile List</b></a></font></td>" & vbNewLine & _
                  "                        </tr>" & vbNewLine &_
                  "                        <tr align=""center"">" & vbNewLine & _
                  "                          <td align=""center"" height=""20"" ><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><a href=""JavaScript:openWindow3('pop_new_smiles.asp')""><b>Show Entire Smile List</b></a></font></td>" & vbNewLine & _
                  "                        </tr>" & vbNewLine
end if
response.write    "      </table>" & vbNewLine
'####################################################
%>



Now this is my Inc_smiles.asp

Response.Write "                      <script language=""Javascript"" type=""text/javascript"">" & vbNewLine & _
      "                      <!-- hide" & vbNewLine & _
         "                      function insertsmilie(smilieface) {" & vbNewLine & _
      "                          AddText(smilieface);" & vbNewLine & _
      "                      }" & vbNewLine & _
      "                      // -->" & vbNewLine & _
      "                      </script>" & vbNewLine & _
      "                      <table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""2"" align=""center"">" & vbNewLine & _
      "                        <tr align=""center"">" & vbNewLine & _
      "                          <td align=""center"" colspan=""4""><a name=""smilies""></a><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><b>Smilies</b></font></td>" & vbNewLine & _
      "                        </tr>" & vbNewLine & _
      "                        <tr align=""center"" valign=""middle"">" & vbNewLine & _
      "                          <td><a href=""Javascript:insertsmilie('')"" tabindex=""-1"">" & getCurrentIcon(strIconSmile,"Smile ","") & "</a></td>" & vbNewLine & _
      "                          <td><a href=""Javascript:insertsmilie('')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileBig,"Big Smile ","") & "</a></td>" & vbNewLine & _
      "                          <td><a href=""Javascript:insertsmilie('')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileCool,"Cool ","") & "</a></td>" & vbNewLine & _
      "                          <td><a href=""Javascript:insertsmilie('')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileBlush,"Blush ","") & "</a></td>" & vbNewLine & _
      "                        </tr>" & vbNewLine & _
      "                        <tr align=""center"" valign=""middle"">" & vbNewLine & _
      "                          <td><a href=""Javascript:insertsmilie('')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileTongue,"Tongue ","") & "</a></td>" & vbNewLine & _
      "                          <td><a href=""Javascript:insertsmilie('')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileEvil,"Evil [):]","") & "</a></td>" & vbNewLine & _
      "                          <td><a href=""Javascript:insertsmilie('')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileWink,"Wink ","") & "</a></td>" & vbNewLine & _
      "                          <td><a href=""Javascript:insertsmilie('')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileClown,"Clown ","") & "</a></td>" & vbNewLine & _
      "                        </tr>" & vbNewLine & _
      "                        <tr align=""center"" valign=""middle"">" & vbNewLine & _
      "                          <td><a href=""Javascript:insertsmilie('')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileBlackeye,"Black Eye ","") & "</a></td>" & vbNewLine & _
      "                          <td><a href=""Javascript:insertsmilie('')"" tabindex=""-1"">" & getCurrentIcon(strIconSmile8ball,"Eight Ball ","") & "</a></td>" & vbNewLine & _
      "                          <td><a href=""Javascript:insertsmilie('')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileSad,"Frown ","") & "</a></td>" & vbNewLine & _
      "                          <td><a href=""Javascript:insertsmilie('')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileShy,"Shy ","") & "</a></td>" & vbNewLine & _
      "                        </tr>" & vbNewLine & _
      "                        <tr align=""center"" valign=""middle"">" & vbNewLine & _
      "                          <td><a href=""Javascript:insertsmilie('')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileShock,"Shocked ","") & "</a></td>" & vbNewLine & _
      "                          <td><a href=""Javascript:insertsmilie('')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileAngry,"Angry ","") & "</a></td>" & vbNewLine & _
      "                          <td><a href=""Javascript:insertsmilie('')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileDead,"Dead ","") & "</a></td>" & vbNewLine & _
      "                          <td><a href=""Javascript:insertsmilie('')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileSleepy,"Sleepy ","") & "</a></td>" & vbNewLine & _
      "                        </tr>" & vbNewLine & _
      "                        <tr align=""center"" valign=""middle"">" & vbNewLine & _
      "                          <td><a href=""Javascript:insertsmilie('')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileKisses,"Kisses ","") & "</a></td>" & vbNewLine & _
      "                          <td><a href=""Javascript:insertsmilie('')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileApprove,"Approve ","") & "</a></td>" & vbNewLine & _
      "                          <td><a href=""Javascript:insertsmilie('')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileDisapprove,"Disapprove ","") & "</a></td>" & vbNewLine & _
      "                          <td><a href=""Javascript:insertsmilie('')"" tabindex=""-1"">" & getCurrentIcon(strIconSmileQuestion,"Question ","") & "</a></td>" & vbNewLine & _
      "                        </tr>" & vbNewLine & _
      "                      </table>" & vbNewLine
%>


Can someone help me on where and what to add to my inc_smiles.asp so it can work?

I only need help with this file as the rest are sort of straight forward, this one is very confusing.

Cheers for anyones help.

Edited by - Podge on 24 March 2009 19:38:20

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 24 March 2009 :  20:20:08  Show Profile  Visit MaD2ko0l's Homepage
eermm i cannot see much of a problem.

can u post a link to the smile manager plus so we can have a look at the readme file.

© 1999-2010 MaD2ko0l
Go to Top of Page

thelodger
Junior Member

United Kingdom
296 Posts

Posted - 25 March 2009 :  01:59:40  Show Profile
Sure, I got it from here

http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=33807
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 25 March 2009 :  06:30:15  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Sorry. I meant to let you know that I added scrollcode tags to your original post so it was more readable. Can you post a link to a text version of your inc_smiles.asp ?

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

thelodger
Junior Member

United Kingdom
296 Posts

Posted - 25 March 2009 :  14:11:29  Show Profile
www.forumsuperstars.com/inc_smilies.txt

Edited by - thelodger on 25 March 2009 14:11:54
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 25 March 2009 :  17:48:56  Show Profile  Visit MaD2ko0l's Homepage
inc_smilies.asp <--- click to view

i assume it should look like this.

basically by the looks of it, all you are doing is replacing the whole of the <table> so that the normal ones are removed so it can pull the new smilies from the database.

however, it is untested and i am not sure if it will add the code as the file in the zip is an older version.

but try it and see what happens

© 1999-2010 MaD2ko0l
Go to Top of Page

thelodger
Junior Member

United Kingdom
296 Posts

Posted - 29 March 2009 :  12:30:19  Show Profile
Cheers Mad, that seemed to work fine.
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 29 March 2009 :  13:22:22  Show Profile  Visit MaD2ko0l's Homepage
;-) no problem...glad i could help

© 1999-2010 MaD2ko0l
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.35 seconds. Powered By: Snitz Forums 2000 Version 3.4.07