Tricked Out News

Welcome to TON. This site is dedicated to development of addons for the RavenNuke™ CMS
Follow Us:
Tricked Out Mods: Forums

 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Tricked Out News shows weird SB links in News
 
 
Post new topic   Reply to topic   print    Tricked Out News Forum Index -> Tricked Out News
View previous topic :: View next topic  
Author Message
Catweazle
Newbie
Newbie


Joined: Aug 07, 2010
Posts: 5

Reputation: 1

PostPosted: Sat Aug 07, 2010 6:52 pm 
Post subject: Tricked Out News shows weird SB links in News
Reply with quote

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.
  
Back to top
View user's profile Send private message
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 600
Location: North Carolina
Reputation: 543Reputation: 543Reputation: 543
votes: 4

PostPosted: Sat Aug 07, 2010 7:12 pm 
Post subject:
Reply with quote

I will look into it asap. It sounds like the css is being included into the link.
_________________
Tricked Out News
  
Back to top
View user's profile Send private message
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 600
Location: North Carolina
Reputation: 543Reputation: 543Reputation: 543
votes: 4

PostPosted: Sat Aug 07, 2010 7:26 pm 
Post subject:
Reply with quote

Is this happening on the index page or the articles page or both?
_________________
Tricked Out News
  
Back to top
View user's profile Send private message
Catweazle
Newbie
Newbie


Joined: Aug 07, 2010
Posts: 5

Reputation: 1

PostPosted: Sat Aug 07, 2010 7:46 pm 
Post subject:
Reply with quote

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.
  
Back to top
View user's profile Send private message
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 600
Location: North Carolina
Reputation: 543Reputation: 543Reputation: 543
votes: 4

PostPosted: Sun Aug 08, 2010 8:52 am 
Post subject:
Reply with quote

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
  
Back to top
View user's profile Send private message
Catweazle
Newbie
Newbie


Joined: Aug 07, 2010
Posts: 5

Reputation: 1

PostPosted: Sun Aug 08, 2010 11:43 am 
Post subject:
Reply with quote

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


Joined: Aug 07, 2010
Posts: 5

Reputation: 1

PostPosted: Sun Aug 08, 2010 12:57 pm 
Post subject:
Reply with quote

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
  
Back to top
View user's profile Send private message
kguske
Blingaholic
Blingaholic


Joined: May 19, 2009
Posts: 24

Reputation: 400.2Reputation: 400.2
votes: 1

PostPosted: Sun Sep 12, 2010 2:02 pm 
Post subject:
Reply with quote

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)
  
Back to top
View user's profile Send private message
kguske
Blingaholic
Blingaholic


Joined: May 19, 2009
Posts: 24

Reputation: 400.2Reputation: 400.2
votes: 1

PostPosted: Sun Sep 12, 2010 2:25 pm 
Post subject:
Reply with quote

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)
  
Back to top
View user's profile Send private message
Catweazle
Newbie
Newbie


Joined: Aug 07, 2010
Posts: 5

Reputation: 1

PostPosted: Sat Sep 18, 2010 6:04 am 
Post subject:
Reply with quote

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 7:25 am; edited 1 time in total
Back to top
View user's profile Send private message
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 600
Location: North Carolina
Reputation: 543Reputation: 543Reputation: 543
votes: 4

PostPosted: Sat Sep 18, 2010 7:20 am 
Post subject:
Reply with quote

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
  
Back to top
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic   print    Tricked Out News Forum Index -> Tricked Out News All times are GMT - 5 Hours
 
 Page 1 of 1

 

Jump to:   
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
Forums ©