| Author |
Message |
zacklk
Newbie


Joined: Mar 20, 2010
Posts: 35
|
Posted:
Wed Jul 07, 2010 1:11 pm |
|
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. |
| |
|
|
 |
spasticdonkey
Newbie


Joined: Sep 05, 2007
Posts: 68
|
Posted:
Wed Jul 07, 2010 2:33 pm |
|
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. |
| |
|
|
 |
zacklk
Newbie


Joined: Mar 20, 2010
Posts: 35
|
Posted:
Thu Jul 08, 2010 7:23 am |
|
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&file=friend
$urlin = array(
"'(?<!/)modules.php\?name=Video_Stream&page=([a-z]*)&id=([0-9]*)&rate=([0-9]*)'",
"'(?<!/)modules.php\?name=Video_Stream&page=([a-z]*)&id=([0-9]*)&vidname=([/:\-\'{}()\._&a-zA-Z0-9+=\?\% ]*)'",
"'(?<!/)modules.php\?name=Video_Stream&page=([a-z]*)&id=([0-9]*)'",
"'(?<!/)modules.php\?name=Video_Stream&page=([a-z]*)&id=([0-9]*)'",
"'(?<!/)modules.php\?name=Video_Stream&d=([0-9]*)'",
"'(?<!/)modules.php\?name=Video_Stream&page=([a-z]*)'",
"'(?<!/)modules.php\?name=Video_Stream&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&d=".$d."
for Previous Page code is
modules.php?name=Video_Stream&page=browse&d=".$p." |
any help is appreciated. |
Last edited by zacklk on Thu Jul 08, 2010 11:21 am; edited 1 time in total |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1294
|
Posted:
Thu Jul 08, 2010 10:25 am |
|
#1) your .htaccess file should only have lines with "&", not "&". The GT script should only have "&" 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. |
| |
|
|
 |
zacklk
Newbie


Joined: Mar 20, 2010
Posts: 35
|
Posted:
Thu Jul 08, 2010 11:16 am |
|
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&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&page=([a-z]*)&id=([0-9]*)&rate=([0-9]*)'",
"'(?<!/)modules.php\?name=Video_Stream&page=([a-z]*)&id=([0-9]*)&vidname=([/:\-\'{}()\._&a-zA-Z0-9+=\?\% ]*)'",
"'(?<!/)modules.php\?name=Video_Stream&page=([a-z]*)&id=([0-9]*)'",
"'(?<!/)modules.php\?name=Video_Stream&page=([a-z]*)&id=([0-9]*)'",
"'(?<!/)modules.php\?name=Video_Stream&d=([0-9]*)'",
"'(?<!/)modules.php\?name=Video_Stream&page=([a-z]*)'",
"'(?<!/)modules.php\?name=Video_Stream&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"
);
?> |
|
| |
|
|
 |
spasticdonkey
Newbie


Joined: Sep 05, 2007
Posts: 68
|
Posted:
Thu Jul 08, 2010 11:54 am |
|
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  |
| |
|
|
 |
spasticdonkey
Newbie


Joined: Sep 05, 2007
Posts: 68
|
Posted:
Thu Jul 08, 2010 12:45 pm |
|
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&page=search&search=user:([a-zA-Z0-9_-]*)"',
'"(?<!/)modules.php\?name=Video_Stream&page=search&d=([0-9]*)"',
'"(?<!/)modules.php\?name=Video_Stream&page=search"',
'"(?<!/)modules.php\?name=Video_Stream&page=broken&id=([0-9]*)&vidname=([/:\-\'{}()\,\._&a-zA-Z0-9+= ]*)"',
'"(?<!/)modules.php\?name=Video_Stream&page=watch&id=([0-9]*)"',
'"(?<!/)modules.php\?name=Video_Stream&page=browse&d=([0-9]*)"',
'"(?<!/)modules.php\?name=Video_Stream&page=browse"',
'"(?<!/)modules.php\?name=Video_Stream&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] |
|
| |
|
|
 |
zacklk
Newbie


Joined: Mar 20, 2010
Posts: 35
|
Posted:
Thu Jul 08, 2010 12:57 pm |
|
| 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  |
oh sorry about that sir. i did activate u. i will check ur code and post back. |
| |
|
|
 |
zacklk
Newbie


Joined: Mar 20, 2010
Posts: 35
|
Posted:
Thu Jul 08, 2010 1:07 pm |
|
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. |
| |
|
|
 |
spasticdonkey
Newbie


Joined: Sep 05, 2007
Posts: 68
|
Posted:
Thu Jul 08, 2010 1:50 pm |
|
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) |
| |
|
|
 |
zacklk
Newbie


Joined: Mar 20, 2010
Posts: 35
|
Posted:
Thu Jul 08, 2010 1:58 pm |
|
| 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. |
| |
|
|
 |
spasticdonkey
Newbie


Joined: Sep 05, 2007
Posts: 68
|
Posted:
Thu Jul 08, 2010 2:40 pm |
|
ok here's the updated version
the $urlin and $urlout
| Code: |
$urlin = array(
'"(?<!/)modules.php\?name=Video_Stream&page=search&search=user:([a-zA-Z0-9_-]*)"',
'"(?<!/)modules.php\?name=Video_Stream&page=search&d=([0-9]*)"',
'"(?<!/)modules.php\?name=Video_Stream&page=search"',
'"(?<!/)modules.php\?name=Video_Stream&page=broken&id=([0-9]*)&vidname=([/:\-\'{}()\,\._&a-zA-Z0-9+= ]*)"',
'"(?<!/)modules.php\?name=Video_Stream&page=comment&moderateVS=([a-zA-Z0-9_-]*)&id=([0-9]*)"',
'"(?<!/)modules.php\?name=Video_Stream&page=watch&id=([0-9]*)&d=([0-9]*)"',
'"(?<!/)modules.php\?name=Video_Stream&page=watch&id=([0-9]*)"',
'"(?<!/)modules.php\?name=Video_Stream&page=send&id=([0-9]*)"',
'"(?<!/)modules.php\?name=Video_Stream&page=rate&id=([0-9]*)&rate=([0-9]*)"',
'"(?<!/)modules.php\?name=Video_Stream&page=vidpop&id=([0-9]*)"',
'"(?<!/)modules.php\?name=Video_Stream&page=browse&d=([0-9]*)"',
'"(?<!/)modules.php\?name=Video_Stream&page=browse"',
'"(?<!/)modules.php\?name=Video_Stream&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..) |
| |
|
|
 |
zacklk
Newbie


Joined: Mar 20, 2010
Posts: 35
|
Posted:
Fri Jul 09, 2010 12:26 am |
|
thanks it works. much better now. but still this 2 links are not working
Submit Video
Send to a friend |
| |
|
|
 |
spasticdonkey
Newbie


Joined: Sep 05, 2007
Posts: 68
|
Posted:
Fri Jul 09, 2010 11:29 am |
|
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
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  |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1294
|
Posted:
Fri Jul 09, 2010 1:25 pm |
|
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. |
| |
|
|
 |
|
|