WordPress.org

Ready to get started?Download WordPress

Forums

Waypath Hack: Content related random trackbacks fr (33 posts)

  1. Laughinglizard
    Member
    Posted 10 years ago #

    I got hooked onto the Waypath idea once I saw how it worked. The creators had hacked together a plug-in for MT and Radio. I wanted one for WP and B2. So here it is. Look at the hack code and instructions at http://dinki.mine.nu/word/b2-img/waypath.txt
    In simple words, this hack implements a pre-determined number of unsolicited trackbacks from the world of blogs on <i>your</i> post topic. Very cool way to surf the blogosphere! Imagine writing about the weaknesses of Microsoft RPC and getting 10 related entries from other blogs on the same topic. Information aggregation that is useful! See how it works at http://dinki.mine.nu/weblog/ Click on a post to get the post and related entries. Very configurable. Uses php XML-RPC.

  2. NuclearMoose
    Member
    Posted 10 years ago #

    LL,
    Very cool! I looked at your code and got a headache! :) I saw the hack in action on your site. Is there a way to have a new window open with just the Waypath links rather than tacking them on to the end of the comment page? That can be a lot of scrolling down to see them. Not only that, when I tried it the first time, I didn't even realise that the links were down at the bottom of the page.
    Anyway, your coding skills are infinitely more superior to mine, and I appreciate the fact that you are sharing it with the community!
    Craig.

  3. Laughinglizard
    Member
    Posted 10 years ago #

    I appreciate your positive feedback. I would think opening a new window every time would be intrusive (I hate pop-ups and pop-unders), a link that says "Click here for related entries from Waypath", would be better. However, that does change the dynamics of the plug-in. I would have to redesign it somewhat to accept a post number and take it from there. It will take me a little while, I have a lot of homework to finish. :-) Hopefully sometime next week. If I forget and you still want me to develop it, shoot me an email and remind me.

  4. NuclearMoose
    Member
    Posted 10 years ago #

    LL,
    I see your point about pop-ups. Instead of you hard-coding the way it's presented to readers, can you not package it up to provide the necessary code to fetch the Waypath links and leave it up to the site designer how to display it?
    "Homework?" C'mon, Lizard, where are your priorities? ;0) ROFL!
    Craig.

  5. gat
    Member
    Posted 10 years ago #

    Great hack! I would suggest how I used it for my blog..
    instead of placing:
    <pre>
    <?php if ($p > 0) {echo waypath(return_content());}?>
    </pre>
    in my template (index.php to be clear), i placed just:
    <pre>
    <?php echo waypath(return_content());?>
    </pre>
    in my comment template. this because, if you try, you will see that the '..if {$p..' thing will not work if you use apache mod_rewrite to generate permalinks (ie. http://gat.blogo.net/2003/11/15/indecisioni/).. just because, i think, the $p variable is not used (is it? well, doesn't matter.. it doesnt work, believe me :) )
    this way you could access your related post going to the item page, or clicking the comment link (which is the same..)..
    i did this way, placed a link named "BlogospheRelated" at the bottom of my posts, which brings back the comment page + anchor (such as #related) in the comment page where the plugin shows his output.
    again, great hack :D !!!
    see you!

  6. gat
    Member
    Posted 10 years ago #

    oh.. i forgot.. if you put the modified code in the popup comment template, you will obtain (linking it the right way) a popup window with your related entries :) isn't it?

  7. gat
    Member
    Posted 10 years ago #

    uhmmm... what do you mean? well, my comment template is the one that cames with wp.. slightly modified.. but.. don't you call the comment template with
    <pre>
    <?php include($abspath . 'b2comments.php'); ?>
    </pre>
    ??? i do so, and just modify b2comments.php with the echo wypath.. uhm.. what do you mean when you say "is your comment template different from your index.php" ?? of course is different.. but i think i'm missing something :D :)
    let me know

  8. Laughinglizard
    Member
    Posted 10 years ago #

    You are right, I was not thinking when I wrote that post. I had changed the way my comments work a very long time ago, and I had forgotten the way the original WP index.php gathered comments... :-P

  9. gat
    Member
    Posted 10 years ago #

    ahah, fine :D well, now you know it's a php include :D
    are you ok now? have you seen how does it works on my blog and my modifications?
    anyway, really COOL hack!!!

  10. gat
    Member
    Posted 10 years ago #

    just upgraded to the current CVS.. and, sadly, it doesnt work.. the page just stops loading, and i can't understand why!
    any ideas?

  11. Laughinglizard
    Member
    Posted 10 years ago #

    Hacks and CVS downloads have never really worked well together. However, on your page, it looks as if the Waypath hack does not even show up on the source of the page. Make sure the hack has not been commented out by CVS in the upgrade process. The comment section of the new CVS has quite a few spam prevention and comment control improvements which changes the structure of the comments.

  12. gat
    Member
    Posted 10 years ago #

    well, actually you might have seen it when i removed the hack code. i noticed that, in fact, the page opens regularly, but after a time.. than i noticed a connection reset by peer error, which, investigating more, was something relate to the firewall policies of our servers, which are part of a DMZ lan.
    so, after the firewall was finally completed, it didn't let anything connect oudside. this makes sense if you think that, after all, you could be hacked, and this way someone would not use your hacked box to make disasters ouside your net, with your ip.. this make more sense if you make regular backups everyday, so even if the hacker destroys your data, the damage will be relative..
    ..of course, this will not make this great hack work :(
    now, i'm discussing this issue with my friends, which are working with me on the server, to eventually permit connections to the waypath server (..and even blo.gs, and other "pinged" sites) to let the hack work..
    i'm thinking about some way to make it work remotely, but i think you always need to make a request outside to include a script.. uhmmm, maybe i'm wrong? is it possible through javascripts or something?
    if you have an idea and would like to share, you're welcome!

  13. debwire
    Member
    Posted 10 years ago #

    I installed this hack and it's great! I do have a few questions though:
    1. How can we reduce the amount of text for "each" blog entry that comes up? How would we just include the title of that blog's post without the text? The reason I ask is because the text often comes out blurry/blurred in the results..
    2. Why does the text come out blurred?

  14. Laughinglizard
    Member
    Posted 10 years ago #

    @debwire:
    The answer is very simple...
    Look for this line:
    new xmlrpcval("3", "int"), #style
    Change the three to 2 or 1 to get different amounts of text returned.
    The reason the text comes out blurry is because of the text size. You can change that in the CSS.

  15. debwire
    Member
    Posted 10 years ago #

    Thank you LaughingLizard...works great. Now another pesky question. How do we get the blog links in the hack to open up in a new window instead of taking visitors off our sites?

  16. Laughinglizard
    Member
    Posted 10 years ago #

    A lot more complicated. The data you see is actually being output by Waypath and returned as a block of HTML from the WayPath XMLRPC server. In order to put a "target=" kind of tag into each HTML link, one would have to parse through the entire output and add the target tags to the links. But here is the solution. The text file linked below explains how to make the links open a new window for wach waypath related item. :-)
    Peace
    http://dinki.mine.nu/word/b2-img/waypath1.txt

  17. tcervo
    Member
    Posted 10 years ago #

    LL,
    Actually, if you want your site to be valid XHTML strict, you wouldn't use the target attribute...it's not allowed for XHTML strict. Instead, use rel="external", then do a similar parse. I just wrote an article on my site about this very thing, since I wanted links opening in a new window to validate. However, my site seems to be down (trouble with my host, I believe, since I can't even FTP to my account.) Hopefully it'll be up soon, so check it out here whent it's up: http://www.tcervo.com/
    Here's a link to the original article where I found the script.
    -Tony

  18. Laughinglizard
    Member
    Posted 10 years ago #

    @tcervo: My bad. I must have been too tired when I looked at this last night. It works just fine even with the rel="external" before the href tag. I have the fix documented in the text file linked below.
    http://dinki.mine.nu/word/b2-img/waypath1.txt

  19. tcervo
    Member
    Posted 10 years ago #

    Perfect, thanks!

  20. Matt Mullenweg
    Troublemaker
    Posted 10 years ago #

    BTW you can use $single instead of $p.

  21. Laughinglizard
    Member
    Posted 10 years ago #

    @wildduck: It does work in WP1.0+ I have modified the original hack instructions to reflect the changes.

  22. Anonymous
    Unregistered
    Posted 10 years ago #

    I have tried to install this but I just can't make it work. I'm using mod_rewrite so I pasted <?php echo waypath(return_content());?> into my index template after the the_content() call. But it just turns up nothing. No error, just nothing.
    Am I missing something?

  23. Mark (podz)
    Support Maven
    Posted 10 years ago #

    @anon - I had problems putting it in 'index.php' so I moved it to wp-comments.php
    Works great from there, and if you want how I've got it set up, I'll help ?

  24. Anonymous
    Unregistered
    Posted 10 years ago #

    hi podz i would love if you could share how you have it set up because i am running 1.02 and am getting nothing also!

  25. Laughinglizard
    Member
    Posted 10 years ago #

    Look for a new version in the form of a plugin for 1.2 once the problems with the XMLRPC interface of Waypath are solved.

  26. OperaManiac
    Member
    Posted 10 years ago #

    plugin would be cool. as i have loads of other blogs, i want waypath on. :D

  27. Anonymous
    Unregistered
    Posted 10 years ago #

    hmmm i've upgraded to 1.2B and it appears waypath in the script doesn't connect ...
    i wonder how people are still able to run it on their WP sites?
    or is it only the genius l-lizard. hehe...

  28. Anonymous
    Unregistered
    Posted 10 years ago #

    i guess i should clarify my error, it is probably on my end somehow:
    Fatal error: Cannot instantiate non-existent class: xmlrpc_client in /home/site/public_html/my-hacks.php on line 20
    is it from the line being commented out //include("xmlrpc.inc"); ??

  29. Laughinglizard
    Member
    Posted 10 years ago #

    @anon: not sure. If you could wait a little....LOL

  30. spark103
    Member
    Posted 10 years ago #

    I am also wondering how this works for 1.2 - it looks like a cool hack but I can't get it to work! =)
    I guess we are all impatient .. wonder what is wrong with the xmlrpc.php ??

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.