Clan Adverts

Sponsors

CT on Facebook

Latest Product

User Box

Anonymous
38.107.179.217
Nickname:

Password:

Security Code
Security Code
Type Security Code


PND Downloads Feed

Phpnuke Downloads
How to Delete or Reset yo...
How to Delete or Reset your PHPNuke Admin Account
Lost your admin password ?  Cant login to your admin account ?This sh...
Back Online & Stuff
Back Online & Stuff
Look at us with our nifty website back up and running… Seriousl...
How to edit the admins in...
How to edit the admins in the forums
Here is a way to make someone admin in your forums on your Evo site. I...
Demo Splash Screen
Demo Splash Screen
Ped @ Clan Themes has released a simple splash screen entrance hack. ...
Free Phpnuke Business The...
Free Phpnuke Business Theme 6
This is the 6th Business theme for Phpnuke that Clan Themes has releas...
Tricked Out Slider
Tricked Out Slider
We have seen some great new things come out of Tricked Out News and th...

Custom Work

PHP Nuke Custom Work

www.clanthemes.com :: View topic - Twitter!
Twitter!
Goto page 1, 2  Next

13 Replies / 1197 Views


Post new topic   Reply to topic  

   www.clanthemes.com Forum Index » Blocks

View previous topic :: View next topic


aCId_rAIn
Reputation: 4.9 Add RepSubtract Rep
Local time: 10:13 AM


Noob
Noob

0.02 posts per day
Medals: 0

Joined: Jun 07, 2009
Last Visit: 29 Aug 2009
Posts: 15
Points: 3040 

Post Twitter! Posted: Tue Jul 07, 2009 1:02 pm

Shop Purchases:
Diablo 3 Ultimate Theme

I made a simple php block, and named it block-TwitterShow.php. I opened it up, and pasted this code in:

Code:
<div id="twitter_div">
<h2 class="sidebar-title">d3-nation.com Twitter Updates</h2>
<ul id="twitter_update_list"></ul>
<a href="http://twitter.com/d3nation" id="twitter-link" style="display:block;text-align:right;">follow d3-nation.com 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/d3nation.json?callback=twitterCallback2&amp;count=5"></script>


The twitter updates work perfectly, but now I've got this:

Image Has Been Resized, Click To Enlarge.


I know this can be fixed very easy, but I'm not saavy on php. I'm not sure how to get the code to stick INSIDE the block, and not outside. Any help would be great. Thanks!
 

 
View user's profileSend private message Reply with quote

Untergang
Reputation: 642.6 Add RepSubtract Rep
votes: 6
Local time: 3:13 PM
Location: Lommel
belgium.gif

Stand-by Stand-by
Stand-by Stand-by

0.20 posts per day
Medals: 0

Joined: May 08, 2007
Last Visit: 31 Oct 2011
Posts: 347
Points: 22131 

Post Re: Twitter! Posted: Tue Jul 07, 2009 1:57 pm

You need to do it like this:
Code:
$content = "your content here";
 

UDesigns.be  
View user's profileSend private messageSend e-mailVisit poster's website Reply with quote

aCId_rAIn
Reputation: 4.9 Add RepSubtract Rep
Local time: 10:13 AM


Noob
Noob

0.02 posts per day
Medals: 0

Joined: Jun 07, 2009
Last Visit: 29 Aug 2009
Posts: 15
Points: 3040 

Post Twitter! Posted: Tue Jul 07, 2009 5:19 pm

Shop Purchases:
Diablo 3 Ultimate Theme

I tried this solution, and it simply printed those characters as well on the output:

Code:
$content= "<div id="twitter_div">
<h2 class="sidebar-title">d3-nation.com Twitter Updates</h2>
<ul id="twitter_update_list"></ul>
<a href="http://twitter.com/d3nation" id="twitter-link" style="display:block;text-align:right;">follow d3-nation.com 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/d3nation.json?callback=twitterCallback2&amp;count=5"></script>";


Doesn't the php file have to declare its language first?
Code:
"language = 'javascript'"
to pass it through php?
 

 
View user's profileSend private message Reply with quote


Untergang
Reputation: 642.6 Add RepSubtract Rep
votes: 6
Local time: 3:13 PM
Location: Lommel
belgium.gif

Stand-by Stand-by
Stand-by Stand-by

0.20 posts per day
Medals: 0

Joined: May 08, 2007
Last Visit: 31 Oct 2011
Posts: 347
Points: 22131 

Post Re: Twitter! Posted: Tue Jul 07, 2009 5:22 pm

Try it like this
Code:
$content= "<div id=\"twitter_div\">
<h2 class=\"sidebar-title\">d3-nation.com Twitter Updates</h2>
<ul id=\"twitter_update_list\"></ul>
<a href=\"http://twitter.com/d3nation\" id=\"twitter-link\" style=\"display:block;text-align:right;\">follow d3-nation.com 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/d3nation.json?callback=twitterCallback2&amp;count=5\"></script>";
 

 
View user's profileSend private messageSend e-mailVisit poster's website Reply with quote

aCId_rAIn
Reputation: 4.9 Add RepSubtract Rep
Local time: 10:13 AM


Noob
Noob

0.02 posts per day
Medals: 0

Joined: Jun 07, 2009
Last Visit: 29 Aug 2009
Posts: 15
Points: 3040 

Post Twitter! Posted: Tue Jul 07, 2009 5:31 pm

Shop Purchases:
Diablo 3 Ultimate Theme

Now I get this:

Image Has Been Resized, Click To Enlarge.
 

 
View user's profileSend private message Reply with quote

Untergang
Reputation: 642.6 Add RepSubtract Rep
votes: 6
Local time: 3:13 PM
Location: Lommel
belgium.gif

Stand-by Stand-by
Stand-by Stand-by

0.20 posts per day
Medals: 0

Joined: May 08, 2007
Last Visit: 31 Oct 2011
Posts: 347
Points: 22131 

Post Re: Twitter! Posted: Tue Jul 07, 2009 5:34 pm

Can you send me your block file so I can have a look?
 

 
View user's profileSend private messageSend e-mailVisit poster's website Reply with quote


DreAdeDcoRpSE
Reputation: 2220.7 Add RepSubtract Rep
votes: 28
Local time: 9:13 AM
Location: Back of your Mind
usa.gif

Forums Moderator
Forums Moderator

1.53 posts per day
Medals: 3 (View more...)
Site Supporter (Amount: 1)
Site Admin
Site Admin
Joined: Sep 22, 2007
Last Visit: 09 Feb 2012
Posts: 2451
Points: 128598 

Post Re: Twitter! Posted: Tue Jul 07, 2009 5:54 pm

Shop Purchases:
Enemy Territory Theme (Aviator) for PHP Nuke · Clan Roster 2.0 ·  · Modern Warfare 3 Xtreme Theme

http://www.clanthemes.com/tutorials-view-173-block-break-down.html

That video I go over blocks and what and how to use them.
 

 
View user's profileSend private messageVisit poster's website Reply with quote

clyde4210
Reputation: 395.3 Add RepSubtract Rep
Local time: 9:13 AM

blank.gif

OMG
OMG

0.11 posts per day
Medals: 0

Joined: Oct 24, 2007
Last Visit: 24 Jul 2009
Posts: 167
Points: 7534 

Post Twitter! Posted: Tue Jul 07, 2009 6:04 pm

Use center tags. Plus DreAdeDcoRpSE has given you the answer. Didn't you notice your code is wrong as well?

Also if it still stays outside the block? You will need to make it smaller somewhere inside your div. If you can

correct code:
Code:
$content .= "<div id=\"twitter_div\">
<h2 class=\"sidebar-title\">d3-nation.com Twitter Updates</h2>
<ul id=\"twitter_update_list\"></ul>
<a href=\"http://twitter.com/d3nation\" id=\"twitter-link\" style=\"display:block;text-align:right;\">follow d3-nation.com 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/d3nation.json?callback=twitterCallback2&amp;count=5\"></script>";


i didn't fix the width and hight nor did I center it. I'll let you do all that. Pint
 

 
View user's profileSend private messageVisit poster's website Reply with quote

Untergang
Reputation: 642.6 Add RepSubtract Rep
votes: 6
Local time: 3:13 PM
Location: Lommel
belgium.gif

Stand-by Stand-by
Stand-by Stand-by

0.20 posts per day
Medals: 0

Joined: May 08, 2007
Last Visit: 31 Oct 2011
Posts: 347
Points: 22131 

Post Re: Twitter! Posted: Tue Jul 07, 2009 6:46 pm

I think you forgot the <?php ?> tags, it looks like it just reads it as text and not php. That's maybe what you meant with the language.
 

 
View user's profileSend private messageSend e-mailVisit poster's website Reply with quote


clyde4210
Reputation: 395.3 Add RepSubtract Rep
Local time: 9:13 AM

blank.gif

OMG
OMG

0.11 posts per day
Medals: 0

Joined: Oct 24, 2007
Last Visit: 24 Jul 2009
Posts: 167
Points: 7534 

Post Twitter! Posted: Tue Jul 07, 2009 6:53 pm

His mistake is that red tiny dot. You are correct, php tags are necessary but it wouldn't display at all if he was missing them. least not the way he is showing it.

$content .=

Now he may even need to use the content tag again for the javascript at the bottom.

You even missed it.

Untergang wrote:
Try it like this
Code:
$content= "<div id=\"twitter_div\">
<h2 class=\"sidebar-title\">d3-nation.com Twitter Updates</h2>
<ul id=\"twitter_update_list\"></ul>
<a href=\"http://twitter.com/d3nation\" id=\"twitter-link\" style=\"display:block;text-align:right;\">follow d3-nation.com 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/d3nation.json?callback=twitterCallback2&amp;count=5\"></script>";


Last edited by clyde4210 on Tue Jul 07, 2009 6:58 pm; edited 1 time in total
 

 
View user's profileSend private messageVisit poster's website Reply with quote

Untergang
Reputation: 642.6 Add RepSubtract Rep
votes: 6
Local time: 3:13 PM
Location: Lommel
belgium.gif

Stand-by Stand-by
Stand-by Stand-by

0.20 posts per day
Medals: 0

Joined: May 08, 2007
Last Visit: 31 Oct 2011
Posts: 347
Points: 22131 

Post Re: Twitter! Posted: Tue Jul 07, 2009 6:56 pm

No that's not true, it works without the dot as well.
If you have for example
$content = "123";
$content .= "456";

$content is now 123456

That's what the dot does
 

 
View user's profileSend private messageSend e-mailVisit poster's website Reply with quote

DreAdeDcoRpSE
Reputation: 2220.7 Add RepSubtract Rep
votes: 28
Local time: 9:13 AM
Location: Back of your Mind
usa.gif

Forums Moderator
Forums Moderator

1.53 posts per day
Medals: 3 (View more...)
Dedication (Amount: 1)
Site Admin
Site Admin
Joined: Sep 22, 2007
Last Visit: 09 Feb 2012
Posts: 2451
Points: 128598 

Post Re: Twitter! Posted: Tue Jul 07, 2009 7:45 pm

Shop Purchases:
Enemy Territory Theme (Aviator) for PHP Nuke · Clan Roster 2.0 ·  · Modern Warfare 3 Xtreme Theme

Untergang wrote:
No that's not true, it works without the dot as well.
If you have for example
$content = "123";
$content .= "456";

$content is now 123456

That's what the dot does


You are correct. You only need the . If there is going to be more then one $content.
Here is the block. I tested it on my RN test site. Not sure what CMS your running but it worked fine there.
Why it didn't work is probably as Untergang said, might of missed the <?PHP and ?>. Who knows.

Whats in this block is just as follows.


Code:
<?PHP

if (!defined('BLOCK_FILE') ) {
    Header("location: ../index.php");
   die();
}

$content= "<div id=\"twitter_div\">
<h2 class=\"sidebar-title\">d3-nation.com Twitter Updates</h2>
<ul id=\"twitter_update_list\"></ul>
<a href=\"http://twitter.com/d3nation\" id=\"twitter-link\" style=\"display:block;text-align:right;\">follow d3-nation.com 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/d3nation.json?callback=twitterCallback2&amp;count=5\"></script>";

?>

block-Twitter.zip
 Description:

Download
 Filename:  block-Twitter.zip
 Filesize:  492 Bytes
 Downloaded:  5 Time(s)

 

 
View user's profileSend private messageVisit poster's website Reply with quote

Post new topic   Reply to topic  
   www.clanthemes.com Forum Index » Blocks


 
13 Replies / 1197 Views
Page 1 of 2
All times are GMT
Goto page 1, 2  Next
Display posts from previous:   
 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum