Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Twitter Feed


daflanger

Recommended Posts

Posted

Hi all

 

I am trying to create a box on the left side with Twitter updates from our Twitter account

 

Twitter has a special code for bloggers to put feeds on their blogs

 

How can I use this code for OSC

 

The code is:

 

<div id="twitter_div">

<h2 class="sidebar-title" style="display:none;">Twitter Updates</h2>

<ul id="twitter_update_list"></ul>

<a href="http://twitter.com/djcorner_uae" id="twitter-link" style="display:block;text-align:right;">follow me on Twitter</a>

</div>

<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>

<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/djcorner_uae.json?callback=twitterCallback2&count=5"></script>

 

 

Please help

 

Regards

Daf

Posted

  echo '<tr><td>';
 $info_box_contents = array();$info_box_contents[] = array('text' => 'Twitter');
 new infoBoxHeading($info_box_contents, false, false);
 $info_box_contents = array();$info_box_contents[] = array('text' => '
<div id="twitter_div">
<h2 class="sidebar-title" style="display:none;">Twitter Updates</h2>
<ul id="twitter_update_list"></ul>
<a href="http://twitter.com/djcorner_uae" id="twitter-link" style="display:block;text-align:right;">follow me on Twitter</a>
</div>
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/djcorner_uae.json?callback=twitterCallback2&count=5"></script>');
 new infoBox($info_box_contents);
 echo '</td></tr>';

 

Add the code just before the closing PHP tag in /catalog/includes/column_left.php

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

I am trying to align the twitter feeds to the left. How can I do that, cause they are aligning to the right? www.djcorner.ae/catalog

Posted

Add this at the end of your stylesheet:

 

ul {
 padding: 18px;
}

 

Sometimes after changing the stylesheet in order to see any change you have to hold the <Ctrl> key down while doing a page refresh in the browser to force the browser to reload all contents from the server, including the newly changed stylesheet.

 

This works with IE and Firefox.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

  • 2 years later...
Posted

Hi!

 

I have used your code mentioned below for several months.

At the moment, it does not show the tweets anymore, after a server update to PHP 5.3

Could that be the problem of the code not functioning anymore?

 

Please have a look at http://www.spelmaterialen.nl in the right column.

There is an infobox with the twitter info and facebook info in the same box.

Now the only thing that is left there, is the shop's account name Spelmaterialen @nieuwspeelgoed , and the link "follow us on" with the twitter logo.

The tweets that were inbetween, have disappeared...

 

 

Kind regards,

Edze

 

 echo '<tr><td>';
$info_box_contents = array();$info_box_contents[] = array('text' => 'Twitter');
new infoBoxHeading($info_box_contents, false, false);
$info_box_contents = array();$info_box_contents[] = array('text' => '
<div id="twitter_div">
<h2 class="sidebar-title" style="display:none;">Twitter Updates</h2>
<ul id="twitter_update_list"></ul>
<a href="http://twitter.com/djcorner_uae" id="twitter-link" style="display:block;text-align:right;">follow me on Twitter</a>
</div>
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/djcorner_uae.json?callback=twitterCallback2&count=5"></script>');
new infoBox($info_box_contents);
echo '</td></tr>';

 

Add the code just before the closing PHP tag in /catalog/includes/column_left.php

Posted

Must be your browser.

 

Using IE8 I see all kinds of tweets.

 

Although they are misaligned...

:unsure:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

feed ziet er goed uit in FF

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...