Advertise With Us
View next topic
View previous topic
Post new topic   Reply to topic   print   Thank Post
Author Message
Catweazle
Newbie
Newbie



Joined: Aug 07, 2010
Posts: 5

Reputation: 1

PostPosted: Sun Aug 08, 2010 9:52 am Reply with quote Back to top

Hi All.

I have this problem with my News articles.
I'm running RavenNuke 2.40.01 (clean install) and Tricked Out News 2.5 (clean install)

The SB link for Facebook is shown as normal (as well as for Myspace, technorati, Twitter, Squidoo and SWiK):
http://www.facebook.com/sharer.php?u=http://mysite.com/article5.html

The SB link for Yahoo! (and the rest) are causing an "URL to long..." error message, due to the abnormal long and weird link:
http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://mysite.com/modules.php&name=News&file=article&sid=5&t=Tau+og+knuter<img+style="opacity;0.4:filter;alpha(opacity=40)"+onmouseover="this.style.opacity=1;this.filters.alpha.opacity=... blah-blah-blah...
(I'll just end it here as there's really alot of lines following...)

Any suggestions on how to solve this problem is much appreciated!
--
Regards,
Catweazle.
 
View user's profile Send private message
bobby
Site Admin
Site Admin



Joined: Jan 20, 2009
Posts: 532

Reputation: 427.2
Votes: 1

PostPosted: Sun Aug 08, 2010 10:12 am Reply with quote Back to top

I will look into it asap. It sounds like the css is being included into the link.

_________________
Tricked Out News 
View user's profile Send private message
bobby
Site Admin
Site Admin



Joined: Jan 20, 2009
Posts: 532

Reputation: 427.2
Votes: 1

PostPosted: Sun Aug 08, 2010 10:26 am Reply with quote Back to top

Is this happening on the index page or the articles page or both?

_________________
Tricked Out News 
View user's profile Send private message
Catweazle
Newbie
Newbie



Joined: Aug 07, 2010
Posts: 5

Reputation: 1

PostPosted: Sun Aug 08, 2010 10:46 am Reply with quote Back to top

Hi,
and tanks alot for taking your time to look into this!

It's on the index page - I don't have the SB links on the article page.
 
View user's profile Send private message
bobby
Site Admin
Site Admin



Joined: Jan 20, 2009
Posts: 532

Reputation: 427.2
Votes: 1

PostPosted: Sun Aug 08, 2010 11:52 pm Reply with quote Back to top

In includes/nukeSEO_SB.php find:

Code:
$bookmarkHTML = "";

   $mynukeurl = str_replace('&amp;', '&', $mynukeurl);

   $mynukeurl = htmlentities(urlencode($mynukeurl));

   $mynuketitle = str_replace('&amp;', '&', $mynuketitle);

   $mynuketitle = urlencode($mynuketitle);


Change to:

Code:
$bookmarkHTML = "";

       $mynuketitle = strip_tags($mynuketitle);

   $mynukeurl = str_replace('&amp;', '&', $mynukeurl);

   $mynukeurl = htmlentities(urlencode($mynukeurl));

   $mynuketitle = str_replace('&amp;', '&', $mynuketitle);

   $mynuketitle = urlencode($mynuketitle);

_________________
Tricked Out News 
View user's profile Send private message
Catweazle
Newbie
Newbie



Joined: Aug 07, 2010
Posts: 5

Reputation: 1

PostPosted: Mon Aug 09, 2010 2:43 am Reply with quote Back to top

Thanks alot mate!
That did the trick, sb-links are all good now Very Happy
--
Regards,
Catweazle
 
View user's profile Send private message
Catweazle
Newbie
Newbie



Joined: Aug 07, 2010
Posts: 5

Reputation: 1

PostPosted: Mon Aug 09, 2010 3:57 am Reply with quote Back to top

Sorry, - seems like I were a bit quick with my last reply...

When you click on either one of the SB-links, the link is treated like the copy and paste thingy:

http://myjeeves.ask.com/mysearch/BookmarkIt?v=1.2&t=webpages&url=http%3A%2F%2Fmysite.com%2Fmodules.php%3Fname%3DNews%26file%3Darticle%26sid%3D5&title=Tau%20og%20knuter%A0
 
View user's profile Send private message
kguske
Blingaholic
Blingaholic



Joined: May 19, 2009
Posts: 23

Reputation: 400.2
Votes: 1

PostPosted: Mon Sep 13, 2010 5:02 am Reply with quote Back to top

Stripping the tags from the title doesn't fully address this issue. There are extra characters and a nbsp space that still get passed with the bookmark's title.

You could do some more fancy stripping in includes/nukeSEO_SB.php, but you shouldn't need to waste the extra processing if the correct (i.e. raw) title is passed to the bookmark function (in fact, you won't need the changes above at all).

Look at the fix this section of my (indent-enhanced) modules/News/index.php (testing comments are left for your reference so you can follow it easier):
Code:
...
#      die($title); // The title is still raw at this point
      $articletitle = $title; // inserted here to pass the raw title to nukeSEO SB
      if ($linklocation=="top"){
         $title .= $toplink;
#      } else {
#            $title .= '';   // this does nothing
      }
      # Tricked Out News
      if ($linklocation=='bottom'){
         $morelink = $bottomlink .'<br>';
      } else {
         $morelink = '<br>';
      }
      # Tricked Out News
      if ($bookmark=='1'){
         # nukeSEO Social Bookmarking Tricked Out News
         require_once('includes/nukeSEO_SB.php');
         global $nukeurl;
         $articleurl = $nukeurl."/article.html$sid";
#         $articletitle = $title;      // save the raw title above
         $socialbookmarkHTML = getBookmarkHTML($articleurl, $articletitle, " ", "small");
         $morelink .= ''.$socialbookmarkHTML.'';
         # nukeSEO Social Bookmarking
      }
#       elseif ($bookmark=='0') echo '';   // this does nothing
      # Control column mod Tricked Out News
...

_________________
nukeSEO(tm) 
View user's profile Send private message
kguske
Blingaholic
Blingaholic



Joined: May 19, 2009
Posts: 23

Reputation: 400.2
Votes: 1

PostPosted: Mon Sep 13, 2010 5:25 am Reply with quote Back to top

I noticed that some / slashes were removed from the br tags, making the code above non-compliant (of course, you'll want to add those back if you copy that part, but it's really only there for reference).

_________________
nukeSEO(tm) 
View user's profile Send private message
Catweazle
Newbie
Newbie



Joined: Aug 07, 2010
Posts: 5

Reputation: 1

PostPosted: Sat Sep 18, 2010 9:04 pm Reply with quote Back to top

I tried to comment out the two urlencode() lines,

Code:
$mynukeurl = str_replace('&amp;', '&', $mynukeurl);
// $mynukeurl = htmlentities(urlencode($mynukeurl));
$mynuketitle = str_replace('&amp;', '&', $mynuketitle);
// $mynuketitle = urlencode($mynuketitle);

.. and the produced link is now ok.

Somewhere along the road I have lost the article title at the end of the produced link,

Code:
http://www.stumbleupon.com/submit?url=http://mysite.com/article5.html&title=

.. but this is probably my own fault? - been fiddling around to much to get this right Wink

NB: The exact url for my article are striped and changed by your board! See the "/article5.html&title=" part of the link...


Last edited by Catweazle on Sat Sep 18, 2010 10:25 pm; edited 1 time in total 
View user's profile Send private message
bobby
Site Admin
Site Admin



Joined: Jan 20, 2009
Posts: 532

Reputation: 427.2
Votes: 1

PostPosted: Sat Sep 18, 2010 10:20 pm Reply with quote Back to top

Kguske did some enhancements to Tricked Out News including fixing this issue. You can download his modified version here.
http://trickedoutnews.com/ftopict-72.html

_________________
Tricked Out News 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic   print   Thank Post

View next topic
View previous topic
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 cannot download files in this forum


Powered by phpBB © 2001-2008 phpBB Group

All times are GMT + 10 Hours
Forums ©

HomeTwitterFaceBookFeedsDonateRecommended Sites

Recommended Sites

Raven PHP Scripts

Nuke SEO

Montego Scripts

Code Authors

nunuke.co.uk