Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support Retweeting possible
Akaleez
Posted on 22 Jul 2010, 22:43:48

Access: Member
Total Posts: 19
Joined: 2010-07-22

Is it possible to get this http://www.twitip.com/get-a-retweet-button-for-your-blog/ to work for my blog posts, so they can retweet any blog of mine on twitter?

Thanks Lisa.
#2743
Chris
Posted on 24 Jul 2010, 13:10:57

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Add this into the "News" section of your template

Code:
<script type="text/javascript">
tweetmeme_url = 'http://example.com/news/index.php?id={id}';
</script>
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>


Make sure to change the example.com/news/ URL to your own.
#2753
Akaleez
Posted on 24 Jul 2010, 13:15:07

Access: Member
Total Posts: 19
Joined: 2010-07-22

Thank you so much :)
#2757
Chris
Posted on 24 Jul 2010, 13:21:48

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

I would change

Code:
tweetmeme_url = 'http://example.com/news/index.php?id={id}';


To

Code:
tweetmeme_url = 'http://example.com/index.php?id={id}';
#2758
Rayc
Posted on 27 Jul 2010, 12:38:13

Access: Member
Total Posts: 74
Joined: 2010-06-13

Chris,

I've been pondering your post above.
What is it that you are suggesting here, and why?

To restructure the site to move the news script out of the /news/ sub-folder and into the root?
To link to the "Home" page rather than the "News" page? Then why the {id} tag?
Is the purpose to shorten the URL for tweeting purposes?

It's probably obvious, I just haven't deduced it from your post.

Thanks,
-RayC
#2766
Akaleez
Posted on 13 Aug 2010, 13:41:51

Access: Member
Total Posts: 19
Joined: 2010-07-22

When people retweet it, is it possible to have the title of the blog? when its retweeted it just shows the url of my site.


For those who haven’t heared Marina http://bit.ly/c5POTO

(For those who haven’t heared Marina is the title)

so im looking for something like that ^ rather than

Lisa Robinson's blog http://bit.ly/cPlVmg
#2775
Last edited by Akaleez at 2010-08-13 14:54:40 Reason:
Chris
Posted on 14 Aug 2010, 21:37:59

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Quote:
Chris,

I've been pondering your post above.
What is it that you are suggesting here, and why?

To restructure the site to move the news script out of the /news/ sub-folder and into the root?
To link to the "Home" page rather than the "News" page? Then why the {id} tag?
Is the purpose to shorten the URL for tweeting purposes?

It's probably obvious, I just haven't deduced it from your post.

Thanks,
-RayC

The reason I suggested changing it from example.com/news/index.php?id={id} to example.com/index.php?id={id} is because when you include the news script into another page, that page is where you want your news to be displayed, so by redirecting to the page you're including into rather than directly to /news/index.php, the user will view the news articles within your design.

Quote:
When people retweet it, is it possible to have the title of the blog? when its retweeted it just shows the url of my site.


For those who haven’t heared Marina http://bit.ly/c5POTO

(For those who haven’t heared Marina is the title)

so im looking for something like that ^ rather than

Lisa Robinson's blog http://bit.ly/cPlVmg

The retweet documentation here says that you can make it grab the title of the page and use it as the text by adding the following to the head section of your page

Code:
<meta name="tweetmeme-title" content="Retweet Button Explained" />


To further expand on that and have the system automatically put the title of the news article in its place add this code to the head section of your page.


Code:
<?php
require_once('../news/db.php');
require_once(
'../news/config.php');

if(
FRIENDLY){
    
$id = $url['0'];
}else{
    
$id = $_GET['id'];
}
$headerinfo = DataAccess::fetch(sprintf("SELECT title, shortstory AS summary, story AS article FROM %s WHERE id = ?", NEWS_ARTICLES), $id);
$title        = $headerinfo['0']['title'];
$summary    = $headerinfo['0']['summary'];
if(!
$id || count($headerinfo) < 1){
    
// not viewing a full article or article doesn't exist so display your normal title
    
echo sprintf('<meta name="tweetmeme-title" content="%s" />%s', "Example something", PHP_EOL);
}else{
    
// Viewing a full article so display the title of that article + description meta tags
    
echo sprintf('<meta name="tweetmeme-title" content="%s" />%s', $title, PHP_EOL);
}
?>
#2779
Akaleez
Posted on 16 Aug 2010, 14:17:30

Access: Member
Total Posts: 19
Joined: 2010-07-22

I get an error when adding that php code ^

ok i see no error but still not showing title of blog just

AKALEEZ.CO.UK Blog. Graphics and freebies. http://t.co/fEz3t2Y via @lisa_mr

www.blog.akaleez.co.uk
#2780
Last edited by Akaleez at 2010-08-16 14:31:45 Reason:
Chris
Posted on 16 Aug 2010, 14:31:02

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Change the paths at the beginning of the script to

Code:
<?php
require_once('news/db.php');
require_once(
'news/config.php');
#2781
Akaleez
Posted on 16 Aug 2010, 14:32:26

Access: Member
Total Posts: 19
Joined: 2010-07-22

Sorted it out with http://dev.twitter.com/pages/tweet_button

thanks again though.
#2782
Last edited by Akaleez at 2010-08-16 14:40:27 Reason:
Network-13.com © 2013