Topic: Make a 'Digg This Thread' button/link in threads.

.

Re: Make a 'Digg This Thread' button/link in threads.

Moved to Modifications

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

3 (edited by reckless 2007-02-10 14:19)

Re: Make a 'Digg This Thread' button/link in threads.

ive got a digg this post. dunno if its any good to you or not

find <div class="postfootright"> around line 336 

after add

<div style="float:left;"><img src="http://digg.com/img/badges/10x10-digg-thumb.png" width="10" height="10" alt="Digg!" /> <a href="http://digg.com/submit?phase=2&url=*YOUR FORUM URL HERE*/viewtopic.php?pid=<?php echo $cur_post['id'].'#p'.$cur_post['id'] ?>&title=<?php echo pun_htmlspecialchars($cur_topic['subject']) ?>">Digg It</a></div>

seems to do the trick

Re: Make a 'Digg This Thread' button/link in threads.

awesome little thing to add! smile

~thegleek

5 (edited by Ree 2007-02-12 20:13)

Re: Make a 'Digg This Thread' button/link in threads.

reckless: Is there a reason you have *YOUR FORUM URL HERE* instead of echoing o_base_url ?  Then the code snippet wouldn't require editing.

Re: Make a 'Digg This Thread' button/link in threads.

the main reason is i didnt know how to do it lol

7

Re: Make a 'Digg This Thread' button/link in threads.

Heh.  That makes sense!

*YOUR FORUM URL HERE* could be replaced with <?php echo $pun_config['o_base_url'] ?>, like so:

<div style="float:left;"><img src="http://digg.com/img/badges/10x10-digg-thumb.png" width="10" height="10" alt="Digg!" /> <a href="http://digg.com/submit?phase=2&url=<?php echo $pun_config['o_base_url'] ?>/viewtopic.php?pid=<?php echo $cur_post['id'].'#p'.$cur_post['id'] ?>&title=<?php echo pun_htmlspecialchars($cur_topic['subject']) ?>">Digg It</a></div>

Re: Make a 'Digg This Thread' button/link in threads.

Can someone please tell me if this Digg url has been formatted properly. I am running a local site and I'm assuming that it does not work because of the static ip address

<img src="http://digg.com/img/badges/10x10-digg-thumb.png" width="10" height="10" alt="Digg!" /> <a href="http://digg.com/submit?phase=2&url='.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].'">Digg It</a>

Thanks!
Bingiman

Re: Make a 'Digg This Thread' button/link in threads.

No one can help me out here? Can someone at least guide me to a post if you know where one can be found.


Thanks

10

Re: Make a 'Digg This Thread' button/link in threads.

Which file to I need to edit to do this?

11 (edited by bingiman 2007-03-22 23:07)

Re: Make a 'Digg This Thread' button/link in threads.

in my case I am using index.php because I am using the miniportal mod.

Re: Make a 'Digg This Thread' button/link in threads.

I cannot believe that there is absolutely no one in this entire community that could help me with this.

13

Re: Make a 'Digg This Thread' button/link in threads.

bingiman, the problem seems to be that your PHP isn't within PHP tags.  Try this instead:

<img src="http://digg.com/img/badges/10x10-digg-thumb.png" width="10" height="10" alt="Digg!" /> <a href="http://digg.com/submit?phase=2&url=<?php echo $pun_config['o_base_url'] ?>/viewtopic.php?pid=<?php echo $cur_post['id'].'#p'.$cur_post['id'] ?>&title=<?php echo pun_htmlspecialchars($cur_topic['subject']) ?>">Digg It</a>

Re: Make a 'Digg This Thread' button/link in threads.

Your does not work for sure. By the way, I have this code in my index.php file which has been modified for the miniportal mod. The thing is that this does work. My problem is this. When I submit it to digg.com the link is fine but the subject is never inserted into the digg subject line as it should be.

Bingiman

15 (edited by bingiman 2007-03-28 22:34)

Re: Make a 'Digg This Thread' button/link in threads.

Guys, I really, really need some help here. I'll pay someone to hel pme sort this error that is driving me crazy. I have thing thing working as it should now but the problem is that I am getting an HTML Validation warning and this is the warning message:

line 239 column 673 - Warning: <a> escaping malformed URI reference

Here is the code below. As mentioned it works great in my index.php file which has been modified. I am also using the Miniportal mod. Please lend a hand here.

<img src="http://www.digg.com/favicon.ico" alt="Digg!" title="Digg!" /> <a style="font-weight: normal;" href="http://digg.com/submit?phase=2&url='.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].'&title='.$cur_topic['subject'].'">Digg It</a>

btw: The error is only present in the title part of the code. If I remove it, the error is gone. The problem is that it does not like the "spaces" in the subject lines. If I did this for example as my subject: THISISATEST, then it works great. Is there some code I can use to remove the spaces from the subject lines? parser.php is called from within the file as well.

Thanks
Bingiman

Re: Make a 'Digg This Thread' button/link in threads.

Warnings don't mean anything, errors are what you want to watch out for.
And I need the source for the page in order to see what's going on

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

17 (edited by bingiman 2007-03-28 22:36)

Re: Make a 'Digg This Thread' button/link in threads.

I know what you're saying about the warning but I am one of those people that can't deal with them. It is a sick obsession of mine. How can I send the file to you?

Thanks

Bingiman

Re: Make a 'Digg This Thread' button/link in threads.

Just paste the code here?

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

19 (edited by bingiman 2007-03-28 23:14)

Re: Make a 'Digg This Thread' button/link in threads.

Thanks for the help Smartys. I removed the code from here because it is not complete.

Thanks again
Bingiman.

Re: Make a 'Digg This Thread' button/link in threads.

<img src="http://www.digg.com/favicon.ico" alt="Digg!" title="Digg!" /> <a style="font-weight: normal;" href="http://digg.com/submit?phase=2&url='.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].'&title='.urlencode($cur_topic['subject']).'">Digg It</a>
http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

21 (edited by mindlessoath 2007-05-28 17:41)

Re: Make a 'Digg This Thread' button/link in threads.

in the index.php file.
locate

echo '<div class="block"><h2><span>'.$news_title.'</span></h2><div class="box"><div class="inbox"><div>'.$news_truncated.'</div><br /><div class="box"><div class="inbox">Posted by '.$news_poster.' | <a href="'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_news['topic_id'].'">Replies</a>: '.$replies.' | Date Posted: '.$news_date.'

and insert after

<img src="http://digg.com/img/badges/10x10-digg-thumb.png" width="10" height="10" alt="Digg!" /> <a 

href="http://digg.com/submit?phase=2&url='.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_news['id'].'&tit

le='.urlencode($cur_news['subject']).'">Digg It</a>

i edited the above post to say $cur_news['id'] instead of $cur_topic.


is there a way to insert the story title in digg?