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

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Twitter button
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Zenfor
Junior Member

372 Posts

Posted - 07 August 2012 :  14:52:38  Show Profile  Reply with Quote
I am trying to put a twitter button on my forum inside inc_header and keep getting errors of course. I know enough asp to just get by but this has got me stumped. I have done other modifications but can't seem to get by this one. Appreciate any suggestions. thanks!

Twiiter code:
quote:
<a href="https://twitter.com/EastonMass" class="twitter-follow-button" data-show-count="false">Follow @EastonMass</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>


This is where I want it to go: TWITTER BUTTON GOES HERE
quote:
"<table align=""center"" border=""0"" cellPadding=""0"" cellSpacing=""0"" width=""100%"">" & vbNewLine & _
" <tr align=center colspan=4>" & vbNewLine & _
" <td valign=""top"" width=""25%""><a href=rss.asp target= _blank><img src=images/rssfeed.jpg border=0></a></td>" & vbNewLine & _
" <td valign=""top"" width=""25%""><img src=questions.gif></td>" & vbNewLine & _
" <td valign=""top"" width=""25%"">TWITTER BUTTON GOES HERE</td>" & vbNewLine & _
" <td valign=""top"" width=""25%"">" & vbNewLine & _
" </td></tr></table><br><hr noshade>" & vbNewLine & _

Webbo
Average Member

United Kingdom
982 Posts

Posted - 07 August 2012 :  17:21:10  Show Profile  Visit Webbo's Homepage  Reply with Quote
Try:

"<table align=""center"" border=""0"" cellPadding=""0"" cellSpacing=""0"" width=""100%"">" & vbNewLine & _
" <tr align=center colspan=4>" & vbNewLine & _
" <td valign=""top"" width=""25%""><a href=""rss.asp"" target="" _blank""><img src=""images/rssfeed.jpg"" border=""0""></a></td>" & vbNewLine & _
" <td valign=""top"" width=""25%""><img src=""questions.gif""></td>" & vbNewLine & _
" <td valign=""top"" width=""25%"">TWITTER BUTTON GOES HERE</td>" & vbNewLine & _
" <td valign=""top"" width=""25%"">" & vbNewLine & _
" </td></tr></table><br><hr noshade>" & vbNewLine & _


If that doesn't work I'm sure Carefree will be along at some point
Go to Top of Page

Zenfor
Junior Member

372 Posts

Posted - 07 August 2012 :  17:50:09  Show Profile  Reply with Quote
There's nothing to try, that's exactly what I quoted. I need to insert the twitter code where I marked it to go. Thanks!
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 08 August 2012 :  02:37:29  Show Profile  Visit Webbo's Homepage  Reply with Quote
Try:

Create a new file and call it inc_twitter.asp

Within the new blank file paste the following, save and upload to your forum directory:

<td valign="top" width="25%">
<a href="https://twitter.com/EastonMass" class="twitter-follow-button" data-show-count="false">Follow @EastonMass</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</td>


Then use the following code inside inc_header,asp:

"<table align=""center"" border=""0"" cellPadding=""0"" cellSpacing=""0"" width=""100%"">" & vbNewLine & _
" <tr align=center colspan=4>" & vbNewLine & _
" <td valign=""top"" width=""25%""><a href=""rss.asp"" target="" _blank""><img src=""images/rssfeed.jpg"" border=""0""></a></td>" & vbNewLine & _
" <td valign=""top"" width=""25%""><img src=""questions.gif""></td>" & vbNewLine
%>
<!--#INCLUDE FILE="inc_twitter.asp"-->
<%
ResponseWrite " " <td valign=""top"" width=""25%"">" & vbNewLine & _
" </td></tr></table><br><hr noshade>" & vbNewLine & _



I haven't tested it but should work


PS Your original code missed out a lot of ' " 's

Edited by - Webbo on 08 August 2012 02:40:09
Go to Top of Page

Zenfor
Junior Member

372 Posts

Posted - 08 August 2012 :  06:43:42  Show Profile  Reply with Quote
quote:
Originally posted by Webbo

Try:


Now I get this error the first line after the include section:

quote:
Microsoft VBScript compilation error '800a0401'

Expected end of statement

/forum/inc_header.asp, line 310

ResponseWrite " " <td valign=""top"" width=""25%"">" & vbNewLine & _
----------------------^


Bythe way, the twitter code is exactly what came from twitter, I didn't remove anything. Thank you very much for your help.
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 08 August 2012 :  17:44:38  Show Profile  Visit Webbo's Homepage  Reply with Quote
My bad, change:
ResponseWrite " " <td valign=""top"" width=""25%"">" & vbNewLine & _


to:
Response.Write " " <td valign=""top"" width=""25%"">" & vbNewLine & _
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 08 August 2012 :  17:56:15  Show Profile  Reply with Quote
quote:
Originally posted by Webbo

My bad, change:
ResponseWrite " " <td valign=""top"" width=""25%"">" & vbNewLine & _


to:
Response.Write " " <td valign=""top"" width=""25%"">" & vbNewLine & _




Duplicated the error. Remove the first quotation mark, thus:

Response.Write " <td valign=""top"" width=""25%"">" & vbNewLine & _
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 08 August 2012 :  17:58:50  Show Profile  Visit Webbo's Homepage  Reply with Quote
Cheers Cf

I'm tired lol
Go to Top of Page

Zenfor
Junior Member

372 Posts

Posted - 08 August 2012 :  19:40:31  Show Profile  Reply with Quote
quote:
Originally posted by Webbo

Cheers Cf

I'm tired lol


You're a genius, that worked! Thank you very much for the help everyone, you guys rock!

Had to make one correction though.

quote:
Response.Write instead of ResponseWrite
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 09 August 2012 :  02:15:15  Show Profile  Visit Webbo's Homepage  Reply with Quote
No problem glad to help

(I corrected the lack of dot in my third post but it went un-noticed )
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000 Version 3.4.07