Montego Scripts: Forums
 

 

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



Joined: Mar 20, 2010
Posts: 35

PostPosted: Wed Jul 07, 2010 1:11 pm Reply with quote

Hi,

Can you please tell me how to tap this url.

Code:
http://www.mysite.com/modules.php?name=Video_Stream&page=browse&d=1

Next Page will be
http://www.mysite.com/modules.php?name=Video_Stream&page=browse&d=2


each page will change browse&d=("number+1")

what do i have to add to .htaccess and GT page. i got all the other urls to work in this module except for this.

thanks you in advance.
 
View user's profile Send private message
spasticdonkey
Newbie
Newbie



Joined: Sep 05, 2007
Posts: 78

PostPosted: Wed Jul 07, 2010 2:33 pm Reply with quote

you might have to post what you have so far, as there could be some conflicts that need fixin'. I did a quick search for the video stream module, and found several sites using it, but none of them had links that looked like that.

a link to the untapped module, or a download for it would help too.
 
View user's profile Send private message
zacklk
Newbie
Newbie



Joined: Mar 20, 2010
Posts: 35

PostPosted: Thu Jul 08, 2010 7:23 am Reply with quote

This is a modified version. so here is the links

http://nuketest.myspace-it.com/modules.php?name=Video_Stream

and for the browse page

http://nuketest.myspace-it.com/modules.php?name=Video_Stream&page=browse

Code

.htaccess

Code:
"'RewriteRule ^videostream.html modules.php?name=Video_Stream
RewriteRule ^videostream-([a-z]*).html modules.php?name=Video_Stream&page=$1
RewriteRule ^videostream-([0-9]*).html modules.php?name=Video_Stream&d=$1
RewriteRule ^videostream-([a-z]*)-([0-9]*).html modules.php?name=Video_Stream&page=$1&id=$2
RewriteRule ^videostream-browse-([0-9]*).html modules.php?name=Video_Stream&page=browse&d=$1
RewriteRule ^videostream-([a-z]*)-([0-9]*)-([0-9]*).html modules.php?name=Video_Stream&page=$1&id=$2&rate=$3
RewriteRule ^videostream-([a-z]*)-([0-9]*)-([[:punct:]?/:\-\'{}()._&a-zA-Z0-9+=\%]*).html modules.php?name=Video_Stream&page=$1&id=$2&vidname=$3



GT-Video_Stream.php

Code:
<?php
/************************************************************************
* Script:     TegoNuke(tm) ShortLinks
* Version:    1.0
* Author:     Rob Herder (aka: montego) of http://montegoscripts.com
* Contact:    montego@montegoscripts.com
* Copyright:  Copyright 2006 by Montego Scripts
* License:    GNU/GPL (see provided LICENSE.txt file)
************************************************************************/
//GT-NExtGEn 0.4/0.5 by Bill Murrin (Audioslaved) http://gt.audioslaved.com (c) 2004
//Original Nukecops GoogleTap done by NukeCops (http://www.nukecops.com)
//modules.php?name=News&amp;file=friend

$urlin = array(
"'(?<!/)modules.php\?name=Video_Stream&page=([a-z]*)&id=([0-9]*)&rate=([0-9]*)'",
"'(?<!/)modules.php\?name=Video_Stream&amp;page=([a-z]*)&amp;id=([0-9]*)&amp;vidname=([/:\-\'{}()\._&a-zA-Z0-9+=\?\% ]*)'",
"'(?<!/)modules.php\?name=Video_Stream&page=([a-z]*)&id=([0-9]*)'",
"'(?<!/)modules.php\?name=Video_Stream&amp;page=([a-z]*)&amp;id=([0-9]*)'",
"'(?<!/)modules.php\?name=Video_Stream&amp;d=([0-9]*)'",
"'(?<!/)modules.php\?name=Video_Stream&page=([a-z]*)'",
"'(?<!/)modules.php\?name=Video_Stream&amp;page=([a-z]*)'",
"'(?<!/)modules.php\?name=Video_Stream'"
);

$urlout = array(
"videostream-\\1-\\2-\\3.html",
"videostream-\\1-\\2-\\3.html",
"videostream-\\1-\\2.html",
"videostream-\\1-\\2.html",
"videostream-\\1.html",
"videostream-\\1.html",
"videostream-\\1.html",
"videostream.html"
);

?>



Code:
for next page code is

modules.php?name=Video_Stream&page=browse&amp;d=".$d."

for Previous Page code is

modules.php?name=Video_Stream&page=browse&amp;d=".$p."


any help is appreciated.


Last edited by zacklk on Thu Jul 08, 2010 11:21 am; edited 1 time in total 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Thu Jul 08, 2010 10:25 am Reply with quote

#1) your .htaccess file should only have lines with "&", not "&amp;". The GT script should only have "&amp;" in them, not "&".

#2) you need a rule with page AND d in it and it must come ahead of the rule that juast has page in it.
 
View user's profile Send private message Visit poster's website
zacklk
Newbie
Newbie



Joined: Mar 20, 2010
Posts: 35

PostPosted: Thu Jul 08, 2010 11:16 am Reply with quote

thank you sir. so is this correct

.htaccess

Code:
RewriteRule ^videostream.html modules.php?name=Video_Stream
RewriteRule ^videostream-([a-z]*).html modules.php?name=Video_Stream&page=$1
RewriteRule ^videostream-([0-9]*).html modules.php?name=Video_Stream&d=$1
RewriteRule ^videostream-([a-z]*)-([0-9]*).html modules.php?name=Video_Stream&page=$1&id=$2
RewriteRule ^videostream-browse-([0-9]*).html modules.php?name=Video_Stream&page=browse&amp;d=$1
RewriteRule ^videostream-([a-z]*)-([0-9]*)-([0-9]*).html modules.php?name=Video_Stream&page=$1&id=$2&rate=$3
RewriteRule ^videostream-([a-z]*)-([0-9]*)-([[:punct:]?/:\-\'{}()._&a-zA-Z0-9+=\%]*).html modules.php?name=Video_Stream&page=$1&id=$2&vidname=$3


GT-Video_Stream.php

Code:
<?php
/************************************************************************
* Script:     TegoNuke(tm) ShortLinks
* Version:    1.0
* Author:     Rob Herder (aka: montego) of http://montegoscripts.com
* Contact:    montego@montegoscripts.com
* Copyright:  Copyright 2006 by Montego Scripts
* License:    GNU/GPL (see provided LICENSE.txt file)
************************************************************************/
//GT-NExtGEn 0.4/0.5 by Bill Murrin (Audioslaved) http://gt.audioslaved.com (c) 2004
//Original Nukecops GoogleTap done by NukeCops (http://www.nukecops.com)

$urlin = array(
"'(?<!/)modules.php\?name=Video_Stream&amp;page=([a-z]*)&amp;id=([0-9]*)&amp;rate=([0-9]*)'",
"'(?<!/)modules.php\?name=Video_Stream&amp;page=([a-z]*)&amp;id=([0-9]*)&amp;vidname=([/:\-\'{}()\._&a-zA-Z0-9+=\?\% ]*)'",
"'(?<!/)modules.php\?name=Video_Stream&amp;page=([a-z]*)&amp;id=([0-9]*)'",
"'(?<!/)modules.php\?name=Video_Stream&amp;page=([a-z]*)&amp;id=([0-9]*)'",
"'(?<!/)modules.php\?name=Video_Stream&amp;d=([0-9]*)'",
"'(?<!/)modules.php\?name=Video_Stream&amp;page=([a-z]*)'",
"'(?<!/)modules.php\?name=Video_Stream&amp;page=([a-z]*)'",
"'(?<!/)modules.php\?name=Video_Stream'"
);

$urlout = array(
"videostream-\\1-\\2-\\3.html",
"videostream-\\1-\\2-\\3.html",
"videostream-\\1-\\2.html",
"videostream-\\1-\\2.html",
"videostream-\\1.html",
"videostream-\\1.html",
"videostream-\\1.html",
"videostream.html"
);

?>
 
View user's profile Send private message
spasticdonkey
Newbie
Newbie



Joined: Sep 05, 2007
Posts: 78

PostPosted: Thu Jul 08, 2010 11:54 am Reply with quote

I was working on this a little, tried to register on your test site as I don't think i can see all the links.. if you can activate my acct Wink
 
View user's profile Send private message
spasticdonkey
Newbie
Newbie



Joined: Sep 05, 2007
Posts: 78

PostPosted: Thu Jul 08, 2010 12:45 pm Reply with quote

well this is what i have so far, no guarantees it will work as I can't test it... it also excludes the "rate" link because I can't see it or tell how it is formatted by your examples.

the $urlin and $urlout
Code:
$urlin = array(
'"(?<!/)modules.php\?name=Video_Stream&amp;page=search&amp;search=user:([a-zA-Z0-9_-]*)"',
'"(?<!/)modules.php\?name=Video_Stream&amp;page=search&amp;d=([0-9]*)"',
'"(?<!/)modules.php\?name=Video_Stream&amp;page=search"',
'"(?<!/)modules.php\?name=Video_Stream&amp;page=broken&amp;id=([0-9]*)&amp;vidname=([/:\-\'{}()\,\._&a-zA-Z0-9+= ]*)"',
'"(?<!/)modules.php\?name=Video_Stream&amp;page=watch&amp;id=([0-9]*)"',
'"(?<!/)modules.php\?name=Video_Stream&amp;page=browse&amp;d=([0-9]*)"',
'"(?<!/)modules.php\?name=Video_Stream&amp;page=browse"',
'"(?<!/)modules.php\?name=Video_Stream&amp;categoryby=([0-9]*)"',
'"(?<!/)modules.php\?name=Video_Stream"'
);

$urlout = array(
'videostream-searchuser-\\1.html',
'videostream-search-\\1.html',
'videostream-search.html',
'videostream-broken-\\1-\\2.html',
'videostream-watch-\\1.html',
'videostream-browse-\\1.html',
'videostream-browse.html',
'videostream-category-\\1.html',
'videostream.html'
);


and htaccess
Code:
#Video Stream
RewriteRule ^videostream-searchuser-([a-zA-Z0-9_-]*).html modules.php?name=Video_Stream&page=search&search=user:$1 [L]
RewriteRule ^videostream-search-([0-9]*).html modules.php?name=Video_Stream&page=search&d=$1 [L]
RewriteRule ^videostream-search.html modules.php?name=Video_Stream&page=search [L]
RewriteRule ^videostream-broken-([0-9]*)-([/:\-\'{}()\,\._&a-zA-Z0-9+=\ ]*).html modules.php?name=Video_Stream&page=broken&id=$1&vidname=$2 [L]
RewriteRule ^videostream-watch-([0-9]*).html modules.php?name=Video_Stream&page=watch&id=$1 [L]
RewriteRule ^videostream-browse-([0-9]*).html modules.php?name=Video_Stream&page=browse&d=$1 [L]
RewriteRule ^videostream-browse.html modules.php?name=Video_Stream&page=browse [L]
RewriteRule ^videostream-category-([0-9]*).html modules.php?name=Video_Stream&categoryby=$1 [L]
RewriteRule ^videostream.html modules.php?name=Video_Stream [L]
 
View user's profile Send private message
zacklk
Newbie
Newbie



Joined: Mar 20, 2010
Posts: 35

PostPosted: Thu Jul 08, 2010 12:57 pm Reply with quote

spasticdonkey wrote:
I was working on this a little, tried to register on your test site as I don't think i can see all the links.. if you can activate my acct Wink


oh sorry about that sir. i did activate u. i will check ur code and post back.
 
View user's profile Send private message
zacklk
Newbie
Newbie



Joined: Mar 20, 2010
Posts: 35

PostPosted: Thu Jul 08, 2010 1:07 pm Reply with quote

ok cool but still few links are not working.

Submit Video
Send to a friend

and when u click on a username its going to error document.

everything else works fine. i will turn off the short links again then. thank you so much for ur help.
 
View user's profile Send private message
spasticdonkey
Newbie
Newbie



Joined: Sep 05, 2007
Posts: 78

PostPosted: Thu Jul 08, 2010 1:50 pm Reply with quote

found some more urls that need tapping, give me a few... in the meantime, i did notice a formatting error on the module index for searching user(s)

Code:
<a href=\"modules.php?name=Video_Stream&page=search&search=user:Anonymous">


(need to remove that backslash)

also noticed that the thumbnail links in the random videos block are formated like
modules.php?name=Video_Stream&page=watch&id=8&d=
and the text link right next to it is formatted
modules.php?name=Video_Stream&page=watch&id=8

(remove the empty d= from the thumbnail, or fix what was supposed to be inserted there)
 
View user's profile Send private message
zacklk
Newbie
Newbie



Joined: Mar 20, 2010
Posts: 35

PostPosted: Thu Jul 08, 2010 1:58 pm Reply with quote

spasticdonkey wrote:
found some more urls that need tapping, give me a few... in the meantime, i did notice a formatting error on the module index for searching user(s)

Code:
<a href=\"modules.php?name=Video_Stream&page=search&search=user:Anonymous">


(need to remove that backslash)

also noticed that the thumbnail links in the random videos block are formated like
modules.php?name=Video_Stream&page=watch&id=8&d=
and the text link right next to it is formatted
modules.php?name=Video_Stream&page=watch&id=8

(remove the empty d= from the thumbnail, or fix what was supposed to be inserted there)


thank you. i will fix them. i sent you a pm. please check.
 
View user's profile Send private message
spasticdonkey
Newbie
Newbie



Joined: Sep 05, 2007
Posts: 78

PostPosted: Thu Jul 08, 2010 2:40 pm Reply with quote

ok here's the updated version

the $urlin and $urlout

Code:
$urlin = array(
'"(?<!/)modules.php\?name=Video_Stream&amp;page=search&amp;search=user:([a-zA-Z0-9_-]*)"',
'"(?<!/)modules.php\?name=Video_Stream&amp;page=search&amp;d=([0-9]*)"',
'"(?<!/)modules.php\?name=Video_Stream&amp;page=search"',
'"(?<!/)modules.php\?name=Video_Stream&amp;page=broken&amp;id=([0-9]*)&amp;vidname=([/:\-\'{}()\,\._&a-zA-Z0-9+= ]*)"',
'"(?<!/)modules.php\?name=Video_Stream&amp;page=comment&amp;moderateVS=([a-zA-Z0-9_-]*)&amp;id=([0-9]*)"',
'"(?<!/)modules.php\?name=Video_Stream&amp;page=watch&amp;id=([0-9]*)&amp;d=([0-9]*)"',
'"(?<!/)modules.php\?name=Video_Stream&amp;page=watch&amp;id=([0-9]*)"',
'"(?<!/)modules.php\?name=Video_Stream&amp;page=send&amp;id=([0-9]*)"',
'"(?<!/)modules.php\?name=Video_Stream&amp;page=rate&amp;id=([0-9]*)&amp;rate=([0-9]*)"',
'"(?<!/)modules.php\?name=Video_Stream&amp;page=vidpop&amp;id=([0-9]*)"',
'"(?<!/)modules.php\?name=Video_Stream&amp;page=browse&amp;d=([0-9]*)"',
'"(?<!/)modules.php\?name=Video_Stream&amp;page=browse"',
'"(?<!/)modules.php\?name=Video_Stream&amp;categoryby=([0-9]*)"',
'"(?<!/)modules.php\?name=Video_Stream"'
);

$urlout = array(
'videostream-searchuser-\\1.html',
'videostream-search-\\1.html',
'videostream-search.html',
'videostream-broken-\\1-\\2.html',
'videostream-comment-moderate-\\1-\\2.html',
'videostream-watch-\\1-page\\2.html',
'videostream-watch-\\1.html',
'videostream-send-\\1.html',
'videostream-rate-\\1-rating\\2.html',
'videostream-vidpop-\\1.html',
'videostream-browse-\\1.html',
'videostream-browse.html',
'videostream-category-\\1.html',
'videostream.html'
);


and htaccess
Code:
#Video Stream
RewriteRule ^videostream-searchuser-([a-zA-Z0-9_-]*).html modules.php?name=Video_Stream&page=search&search=user:$1 [L]
RewriteRule ^videostream-search-([0-9]*).html modules.php?name=Video_Stream&page=search&d=$1 [L]
RewriteRule ^videostream-search.html modules.php?name=Video_Stream&page=search [L]
RewriteRule ^videostream-broken-([0-9]*)-([/:\-\'{}()\,\._&a-zA-Z0-9+=\ ]*).html modules.php?name=Video_Stream&page=broken&id=$1&vidname=$2 [L]
RewriteRule ^videostream-comment-moderate-([a-zA-Z0-9_-]*)-([0-9]*).html modules.php?name=Video_Stream&page=comment&moderateVS=$1&id=$2 [L]
RewriteRule ^videostream-watch-([0-9]*)-page([0-9]*).html modules.php?name=Video_Stream&page=watch&id=$1&d=$2 [L]
RewriteRule ^videostream-watch-([0-9]*).html modules.php?name=Video_Stream&page=watch&id=$1 [L]
RewriteRule ^videostream-send-([0-9]*).html modules.php?name=Video_Stream&page=send&id=$1 [L]
RewriteRule ^videostream-rate-([0-9]*)-rating([0-9]*).html modules.php?name=Video_Stream&page=rate&id=$1&rate=$2 [L]
RewriteRule ^videostream-vidpop-([0-9]*).html modules.php?name=Video_Stream&page=vidpop&id=$1 [L]
RewriteRule ^videostream-browse-([0-9]*).html modules.php?name=Video_Stream&page=browse&d=$1 [L]
RewriteRule ^videostream-browse.html modules.php?name=Video_Stream&page=browse [L]
RewriteRule ^videostream-category-([0-9]*).html modules.php?name=Video_Stream&categoryby=$1 [L]
RewriteRule ^videostream.html modules.php?name=Video_Stream [L]


as for the problem with the user search link, i did not change yet, as I wasn't sure if it was related to the aforementioned problem with the link formatting. It may be related to the use of a colon in the URL, not sure I handled that correctly. (montego? the first rewrite..)
 
View user's profile Send private message
zacklk
Newbie
Newbie



Joined: Mar 20, 2010
Posts: 35

PostPosted: Fri Jul 09, 2010 12:26 am Reply with quote

thanks it works. much better now. but still this 2 links are not working

Submit Video
Send to a friend
 
View user's profile Send private message
spasticdonkey
Newbie
Newbie



Joined: Sep 05, 2007
Posts: 78

PostPosted: Fri Jul 09, 2010 11:29 am Reply with quote

cool it's working better, we will get there... lol

I don't have much time today, but I'll give you a couple things to checkout.. Those links are generated by javascript, so you may need to make some edits to the module to use the shortlink url in the JS.

example before (from modules/Video_Stream/javascript.php)
Code:
function loadsend(id) {
   window.open('modules.php?name=Video_Stream&page=send&id='+id+'','','scrollbars=no,menubar=no,height=240,width=200,resizable=no,toolbar=no,location=no,status=no');
}

try changing to
Code:
function loadsend(id) {
   window.open('videostream-send-'+id+'.html','','scrollbars=no,menubar=no,height=240,width=200,resizable=no,toolbar=no,location=no,status=no');
}


If you look at the page source you can see shortlinks is butchering some of the js links atm. There are others that need a fixin on several pages of the module, just follow the same logic (assuming it fixes the issue) only fixing what is broken Smile

also noticed on the comments link part of the argument is missing, there shouldn't be "undefined" in the URL, the script is expecting a number

if you look at the loadcomment function
(from modules/Video_Stream/javascript.php)
Code:
function loadcomment(id, modcom) {
   window.open('modules.php?name=Video_Stream&page=comment&moderateVS='+modcom+'&id='+id+'','','scrollbars=no,menubar=no,height=250,width=500,resizable=no,toolbar=no,location=no,status=no');
}


you can see it is expecting "modcom" as part of the argument. But when it is called from modules/Video_Stream/watch.php
Code:
<a href=\"javascript:loadcomment(".$id.")\">

only the id is provided.... that is why "undefined" appears in the URL... find out what the different modcom settings mean (i think it may be used for edit/delete/creation of comment), and ideally insert the correct value there Smile
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Fri Jul 09, 2010 1:25 pm Reply with quote

Sorry folks. tough for me to support via my cell phone. Been out of town. Thanks Spastic for all the help! Will be back to "full strentgh" on Monday.
 
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-bunch