X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Display your Twitter posts (https://forum.x-cart.com/showthread.php?t=51751)

PhilJ 01-13-2010 08:15 AM

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

stizz 03-17-2010 01:58 AM

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!

amy2203 03-17-2010 03:34 AM

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>




stizz 03-17-2010 03:51 AM

Re: Display your Twitter posts
 
Works like a charm! Thanks a lot!
What did i do wrong??

amy2203 03-17-2010 04:20 AM

Re: Display your Twitter posts
 
it's the capture and include dialog that display the dialog box, I just took them out,

stizz 03-17-2010 06:03 AM

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?

amy2203 03-17-2010 06:28 AM

Re: Display your Twitter posts
 
you really need to put the include in the home.tpl file,

hth

stizz 03-17-2010 06:33 AM

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?

amy2203 03-17-2010 06:36 AM

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.

stizz 03-17-2010 06:40 AM

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?


All times are GMT -8. The time now is 06:15 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.