Montego Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic
Author Message
spasticdonkey
Newbie
Newbie



Joined: Sep 05, 2007
Posts: 78

PostPosted: Sun Dec 04, 2011 6:21 am Reply with quote

Found a slight glitch in the PM popup not being tapped correctly within the forums. The GT-file currently uses amp and I believe the pm popup url is only used inside of JavaScript; and does not use amp. So you end up with:
messages.html&file=index&mode=newpm&popup=1

If you remove amp for that rewrite within the GT-file, the url taps correctly.
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Mon Dec 05, 2011 8:56 am Reply with quote

I was not able to replicate this on my local copy of Montego Scripts so I just sent you a PM (and temporarily changed your user preference to pop-up). Let us see if we can replicate it here as both my local and this site are running the latest SL.

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
spasticdonkey
Newbie
Newbie



Joined: Sep 05, 2007
Posts: 78

PostPosted: Mon Dec 05, 2011 2:15 pm Reply with quote

I didn't receive the popup but I have a feeling my browser blocked it. I see the popup code when looking at the source and it is tapped correctly.

That's strange because I have not been able to get it to tap on my local test site.... If I set
$tnsl_bAutoTapLinks = true;
I get the partially tapped url as above, if false I get an untapped url. $tnsl_bAutoTapLinks = true; is required for the disqus code to function correctly...

I have double checked and I'm running the latest version of all files from our svn.

Not a huge deal in the grand scope of things, working on a theme and trying to replace with a modal window. The partially tapped url loads the private message inbox instead of the popup, which doesn't fit well (or at all) within a modal..

Have checked other themes and getting the same behavior. Mystery to me.. although I'm pretty sure any occurrence of the url in question does not use amp unless it is being added by shortlinks.

modules/Forums/includes/page_header.php
modules/Forums/includes/page_header_review.php
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Tue Dec 06, 2011 7:16 am Reply with quote

Ok, I am definitely not using auto tapped links. My preference is really to use GTZ-PageTap.php instead along with making sure the needed taps are in place for each module. This gives me a little more to go on so thanks.

But, I question why you have to have it on as well for the disqus code to work? That tells me some taps are missing somewhere.

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
spasticdonkey
Newbie
Newbie



Joined: Sep 05, 2007
Posts: 78

PostPosted: Tue Dec 06, 2011 10:01 am Reply with quote

It has to do with the embed of the disqus code and not having to hard-code the short version of the disqus url.

If $tnsl_bAutoTapLinks = false shortlinks improperly adds amp to the url inside of javascript, and does not tap the url (it is an absolute url based on $nukeurl)

$tnsl_bAutoTapLinks = false

Image

$tnsl_bAutoTapLinks = true

Image

shortlinks disabled

Image

If there is another solution to tapping this url, I'm all for it Smile
this was discussed awhile back @ http://nukeseo.com/modules.php?name=Forums&file=viewtopic&t=498
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Thu Dec 08, 2011 9:10 am Reply with quote

Could have sworn we fixed all the javascript related issues with this code change here:

Code:

function tnsl_fCleanLinks(&$getNextGen) {
   $getNextGen = preg_replace_callback('#(href|action|src)(\s*=\s*[\'"])([a-zA-Z0-9/&;:=\#\?\._-]*)(["\'])#i', 'tnsl_fCleanLinksStub', $getNextGen);
   return;
}


I don't see how the "var disqus_url = " line could possibly be cleaned (which is where the & to &amp would have occurred). So, for now, I'm a bit stumped.

Unfortunately I am extremely busy with work/home, so not sure when I'll get to this. As I can carve out a little time I will. sorry.

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Thu Dec 08, 2011 9:15 am Reply with quote

Wait a minute! Just checked the forum thread you highlighted. I'll bet your implementation is really this:

Code:

$getNextGen = preg_replace_callback('#(disqus_url|href|action|src)(\s*=\s*[\'"])([a-zA-Z0-9/&;:=\#\?\._-]*)(["\'])#i', 'tnsl_fCleanLinksStub', $getNextGen);


Which is why it is getting cleaned and tapped.

So, never mind. I see why it is working with disqus... you were only showing me that to explain why you needed to have auto tap links on right?

I still need to focus on the PM pop-up message. I'll find it.

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
spasticdonkey
Newbie
Newbie



Joined: Sep 05, 2007
Posts: 78

PostPosted: Thu Dec 08, 2011 3:11 pm Reply with quote

Yes I was just confirming why I had auto tap links on.. Although if I can tap the url for disqus without it, my partially tapped pm link will no longer be an issue. Makes me wonder if we could do something like this in the GT_News file, which taps disqus and would also solve the issue with Printable shortlink awareness** (News),... although the pdf feature I could not get tapped.

Code:
$baseURL = getNukeURL();
$urlin = array(
'"' . $baseURL . 'modules.php\?name=News&file=article&sid=([0-9]*)"',
'"(?<!/)modules.php\?name=News&amp;file=article&amp;sid=([0-9]*)"',
.......
);

$urlout = array(
$baseURL . 'article\\1.html',
'article\\1.html',
.......
);


I used kguske's getNukeURL() (included in mainfile) as it compensates for a nukeurl with and/or without a trailing slash. Any thoughts?

** I had to add tnsl_fPageTapStart() and tnsl_fPageTapFinish(); to News/print.php to tap this page
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Fri Dec 09, 2011 9:05 am Reply with quote

I'll have to look this on Sunday. As long as something else serious doesn't come up, I have negotiated with the family to leave me alone that day so I can catch up on some of this stuff. Smile

I don't want to bake anything into getNukeURL() because based upon some feedback I gave to kguske, that function may not make it into his final nukeSPAM module. But, maybe you can convince the RN team to just add it like you have to mainfile.php, as it could have use throughout.

RE: Your last "***" comment at the bottom. I'll take a look at that too. I seem to recall having to make some additional code changes for nukeSEO (the google site map I think) but it was so long back it is a very distant and much faded memory. Laughing

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
spasticdonkey
Newbie
Newbie



Joined: Sep 05, 2007
Posts: 78

PostPosted: Fri Dec 09, 2011 10:58 am Reply with quote

Thanks for taking some time when you can. I didn't make any modifications to mainfile, just noting that the getNukeURL() function is included by mainfile as a part of nukeFEED. We actually borrow that function in News (pdf).

I suppose it's a simple enough function to replicate if kguske has plans to remove.. Ideally the rn core should be verifying the $nukeurl is in the correct format so a function such as getNukeURL() isn't needed, but that's another story.. Smile
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Sat Dec 10, 2011 6:12 pm Reply with quote

Ok, found the problem. It is actually in the Your_Account GT file. So, open the GT-Your_Account.php file and change this line from:

Code:

'"(?<!/)modules.php\?name=Private_Messages"',


to this:

Code:

'"(?<!/)modules.php\?name=Private_Messages(?!&)"',


I've been needing to put the right closings on many of the final module taps for a long time. I'm going to do through each and every one of these and make sure they are correct.

But, that one small fix alone will make the pop-ups work for you now. You must have an untapped Your_Account link somewhere on your site and so when it ran through the AutoLink code for that GT file, it also forced the tap on the pop-up link.

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 4 Hours
 
Forums ©
linear-bunchlinear-bunch
linear-bunch