Posted by pkcho on March 7, 2011 at 9:37pm
I've been searching for how to use the Twitter Pull module. I have gone to the project page and read about how to tweak the settings for my use, by doing the following...
<?php if (function_exists('twitter_pull_render')) { print twitter_pull_render('@openpublish', 'OpenPublish', 10); } ?>I tweaked the settings in the openpublish_core.module, but for the life of me, I have no idea how to get a block to show up anywhere.
I went to Context and scanned line by line for something related related to Twitter as something that could be configured and came up with nothing.
If someone could help me with what I'm missing that would be greatly appreciated.
Thank you,
Joe
Comments
hi, just an (my) example
hi,
just an (my) example :
--------------------- php -------------------------
go to page-front.tpl.php
insert the following php codes :
<?phpprint $left;
?>
<?phpprint twitter_pull_render ('@openpublish', t('OpenPublish official'), 3, 'op_homepage_tweets');
?>
<?phpprint $over_content;
?>
<?phpprint twitter_pull_render ('@openpublisher', t('OpenPublish last trend'), 1, 'op_homepage_tweets');
?>
<?phpprint $right;
?>
--------------------------- CSS ------------
CSS : in components.css,
/* Tweets 1*/
div.tweets-pulled-listing {
padding: 8px 0px 0px 0px;
margin: -14px 0 0 0;
color: #000;
}
ul.tweets-pulled-listing {
margin: 0;
padding: 0;
}
div.tweets-pulled-listing a {
color: #000;
}
.tweets-pulled-listing li {
background: #FFF;
border: 1px solid #d9d9d9;
padding: 6px;
margin: 0 0 7px 0;
}
div.tweets-pulled-listing ul {
background: none;
border: none;
font-family:Verdana, Geneva, sans-serif;
font-size: .9em;
}
div.tweets-pulled-listing .tweet-author a {
font-weight:bold;
color: #808285;
}
div.tweets-pulled-listing .tweet-text a {
color: #808285;
text-decoration:underline;
}
div.tweets-pulled-listing .tweet-time a {
color: #780F2C;
font-style: italic;
font-family:Verdana, Geneva, sans-serif;
font-size: .9em;
}
block-twitter_pull-op_tweets div.tweets-pulled-listing {
margin: 0;
}
CSS?
Thanks for posting your CSS here, Chrys.
Just a single question:
why you're editing components.css for this?
Shouldn't that styles be set in the twitter-pull-listing.css (which comes with the Twitter Pull module)?
Data recovery | Melodiya records
Thank you very much for
Thank you very much for helping me with this.
I guess my unfamiliarity with php shows in this case, not knowing what to do when given code like...
<?php if (function_exists('twitter_pull_render')) { print twitter_pull_render('@openpublish', 'OpenPublish', 10); } ?>you place it in a page.tpl.php file.
The thought of placing it in the page-front.tpl.php did cross my mind, but then I ruled it out because how would it know where to place the twitter block in relation to the other content there?
Which leads to my next question... how do I control the position of the tweets, now that it is in a region?
Thank you,
Joe
PS. By the way, chrysonline, your site looks great!
If you have php enabled in
If you have php enabled in your input formats, you can create a block in the admin pages.
Change the following:
@openpublish to your twitter username @yourname
OpenPublish to what you want it to be
10 to the amount of tweets you want to show
-Ronald
That makes sense. I should've
That makes sense. I should've thought of that!
Documentation-wise, it would have been so helpful to give an example or two of how to implement this.
Thank you,
Joe
Blocks
"I have no idea how to get a block to show up anywhere."
Go to Administer > Site Building > Blocks
There you may choose to configure each block and choose where to display it.
Hope this is what you meant ... It works with your theme, depends on the regions in the .info file of your theme as to what regions are available to display blocks.
Handbook on Platform Cooperativism, a movement building platforms and tools owned by the people. http://bit.ly/hackitownit
Create a new block for that code
Yes, as the Micky Metts said, use that php code (change twitter name) to paste into the newly created block.
Just don't forget to set its input format to "PHP code".
Data recovery | Melodiya records
I am using the following code
I am using the following code in a custom php field in a view:
<?phpif (function_exists('twitter_pull_render')) { print twitter_pull_render(arg(7), '', 5 ); }
?>
It works well for the most part. However, it will not limit the number of posts pulled to 5. It pulls around 100.
Any idea why this is not working correctly?
I figured out the problem. I
I figured out the problem. I needed to set the items to display to "1"