Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Display your Twitter posts

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 01-13-2010, 08:15 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Display your Twitter posts

If you tweet a lot, here's a simple way to display your Twitter posts in your store...

http://www.xcartmods.co.uk/product.php?productid=70
__________________
xcartmods.co.uk
Reply With Quote
  #2  
Old 03-17-2010, 01:58 AM
 
stizz stizz is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 51
 

Default Re: Display your Twitter posts

Hey PhilJ,

Great tool, still got some problems with it.

I've been testing it on a static page. The tool loads the tweets. No problems with that. I would like to place the square box which loads the tweets without the menu around it. I've tried wrapping this code: {if $main eq "catalog" && $current_category.category eq ""}
...
{/if}

around:

{include file="twitter/twitter_d.tpl"}

If i do it doesn't show anything.

Can't get the loading box without the menu. Do you have any idea how i could get it to work?

Thanks in advance!
__________________
http://www.stizz.nl X-Cart version 4.1.9 & 4.5.
Reply With Quote
  #3  
Old 03-17-2010, 03:34 AM
  amy2203's Avatar 
amy2203 amy2203 is offline
 

X-Wizard
  
Join Date: Jul 2004
Location: Watford, UK
Posts: 1,509
 

Default Re: Display your Twitter posts

try using this instead:
Code:
{literal} <script type="text/javascript"> $(document).ready(function() { $("#twitter").getTwitter({ userName: "accountname", numTweets: 5, loaderText: "Loading tweets...", slideIn: true, slideDuration: 750, showHeading: false, headingText: "Latest Tweets", showProfileLink: false, showTimestamp: true }); }); </script> {/literal} <div id="twitter"></div>
__________________
X-Cart version 5 (Previously 3.5-4)

Previous Versions included
BCSE Reward Points Mod
Altered Cart On Sale Mod
Wordpress Plugin

Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there.

Shout me a Coffee!
Reply With Quote
  #4  
Old 03-17-2010, 03:51 AM
 
stizz stizz is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 51
 

Default Re: Display your Twitter posts

Works like a charm! Thanks a lot!
What did i do wrong??
__________________
http://www.stizz.nl X-Cart version 4.1.9 & 4.5.
Reply With Quote
  #5  
Old 03-17-2010, 04:20 AM
  amy2203's Avatar 
amy2203 amy2203 is offline
 

X-Wizard
  
Join Date: Jul 2004
Location: Watford, UK
Posts: 1,509
 

Default Re: Display your Twitter posts

it's the capture and include dialog that display the dialog box, I just took them out,
__________________
X-Cart version 5 (Previously 3.5-4)

Previous Versions included
BCSE Reward Points Mod
Altered Cart On Sale Mod
Wordpress Plugin

Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there.

Shout me a Coffee!
Reply With Quote
  #6  
Old 03-17-2010, 06:03 AM
 
stizz stizz is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 51
 

Default Re: Display your Twitter posts

Hi Amy 2203,

Thanks for your explanation. Now i've got another question. We've been using the txt_welcome area to fill up the mainpage. I know it's not the best thing, but it's completely build in html. Now i'd like to add the {include file="twitter/twitter.tpl"} to this html built homepage. Unfortunately that isn't working .

Do you have any idea on how to fix that into an html table?
__________________
http://www.stizz.nl X-Cart version 4.1.9 & 4.5.
Reply With Quote
  #7  
Old 03-17-2010, 06:28 AM
  amy2203's Avatar 
amy2203 amy2203 is offline
 

X-Wizard
  
Join Date: Jul 2004
Location: Watford, UK
Posts: 1,509
 

Default Re: Display your Twitter posts

you really need to put the include in the home.tpl file,

hth
__________________
X-Cart version 5 (Previously 3.5-4)

Previous Versions included
BCSE Reward Points Mod
Altered Cart On Sale Mod
Wordpress Plugin

Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there.

Shout me a Coffee!
Reply With Quote
  #8  
Old 03-17-2010, 06:33 AM
 
stizz stizz is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 51
 

Default Re: Display your Twitter posts

How is it possible that the {include file="twitter/twitter.tpl"} works on a static page but not on txt_welcome?
__________________
http://www.stizz.nl X-Cart version 4.1.9 & 4.5.
Reply With Quote
  #9  
Old 03-17-2010, 06:36 AM
  amy2203's Avatar 
amy2203 amy2203 is offline
 

X-Wizard
  
Join Date: Jul 2004
Location: Watford, UK
Posts: 1,509
 

Default Re: Display your Twitter posts

because the statc page is parsed by the smarty template engine, but the txt_welcom is just a textvariable so it justspits out what is in it, it doesn't get parsed by smarty.
__________________
X-Cart version 5 (Previously 3.5-4)

Previous Versions included
BCSE Reward Points Mod
Altered Cart On Sale Mod
Wordpress Plugin

Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there.

Shout me a Coffee!
Reply With Quote
  #10  
Old 03-17-2010, 06:40 AM
 
stizz stizz is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 51
 

Default Re: Display your Twitter posts

Ah Allright, and what if i do it like this.. (this worked with another jquery slider)


<link rel="stylesheet" type="text/css" href="http://MYSITE.COM/skin1/twitter/jquery.twitter.css" />
<script type="text/javascript" src="http://http://MYSITE.COM/skin1/twitter/jquery-1.3.2.min.js" ></script>
<script type="text/javascript" src="http://MYSITE.COM/skin1/twitter/jquery.twitter.js" ></script>
<script type="text/javascript">
$(document).ready(function() {
$("#twitter").getTwitter({
userName: "myaccount",
numTweets: 3,
loaderText: "Tweets laden...",
slideIn: true,
slideDuration: 750,
showHeading: false,
headingText: "Nieuwste Tweets",
showProfileLink: false,
showTimestamp: true
});
});
</script>
{/literal}
<div id="twitter"></div>

I've got it to work with another jquery file. That worked. Can't get this to work. What am i missing?
__________________
http://www.stizz.nl X-Cart version 4.1.9 & 4.5.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:03 PM.

   

 
X-Cart forums © 2001-2020