I am a little confused with the instructions from this site
3. Add the code from the header.php file to your $urlin array in the function replace_for_mod_rewrite, and to the $urlout array. Again, make sure you substitute your Gallery module's name in each of the "name=gallery" portions of the code.
I don't quite follow this?
Also in the header.php which comes with the zip from this site is also a little confusing
Code: › ##################
# IN function replace_for_mod_rewrite(&$s), ADD TO THE END OF THE ARRAY:
##################
# MAKE SURE YOU CHANGE THE NAME OF YOUR GALLERY TO YOUR GALLERY MODULE NAME
# AT EACH OF THE name=gallery SEGMENTS OF THIS CODE
##################
"'(?<!/)modules.php\?name=gallery'",
"'(?<!/)modules.php\?op=modload&name=gallery&file=index&include=albums.php&set_albumListPage=([0-9]*)'",
"'(?<!/)modules.php\?op=modload&name=gallery&file=index&include=albums.php'",
"'(?<!/)modules.php\?set_albumName=([a-zA-Z0-9_-]*)&id=([a-zA-Z0-9_-]*)&op=modload&name=gallery&file=index&include=view_photo.php'",
"'(?<!/)modules.php\?set_albumName=([a-zA-Z0-9_-]*)&op=modload&name=gallery&file=index&include=view_album.php&page=([0-9]*)'",
"'(?<!/)modules.php\?set_albumName=([a-zA-Z0-9_-]*)&op=modload&name=gallery&file=index&include=view_album.php'"
# ADD THIS CODE TO THE $urlout ARRAY:
"gallery.html",
"gallery-page\\1.html",
"gallery.html",
"gallery-photo_\\1-\\2.html",
"gallery-album_\\1-page\\2.html",
"gallery-album_\\1.html"
IN function replace_for_mod_rewrite(&$s), ADD TO THE END OF THE ARRAY:
Does this mean like this?
Code: › #Start of Google Tap Header
global $module_name;
// Google Tap On or Off, 1=On, 0=Off
$ob = 1;
if ($ob == 1) {
if (file_exists("GoogleTap/GT-".$module_name.".php")) {
ob_start();
} else {
$ob = 0;
}
}
function replace_for_mod_rewrite(&$s) {
global $module_name;
"'(?<!/)modules.php\?name=gallery'",
"'(?<!/)modules.php\?op=modload&name=gallery&file=index&include=albums.php&set_albumListPage=([0-9]*)'",
"'(?<!/)modules.php\?op=modload&name=gallery&file=index&include=albums.php'",
"'(?<!/)modules.php\?set_albumName=([a-zA-Z0-9_-]*)&id=([a-zA-Z0-9_-]*)&op=modload&name=gallery&file=index&include=view_photo.php'",
"'(?<!/)modules.php\?set_albumName=([a-zA-Z0-9_-]*)&op=modload&name=gallery&file=index&include=view_album.php&page=([0-9]*)'",
"'(?<!/)modules.php\?set_albumName=([a-zA-Z0-9_-]*)&op=modload&name=gallery&file=index&include=view_album.php'"
if (file_exists("GoogleTap/GT-$module_name.php")) {
include("GoogleTap/GT-$module_name.php");
}
$s = preg_replace($urlin, $urlout, $s);
return $s;
} #End of Google Tap Header
# ADD THIS CODE TO THE $urlout ARRAY:
Does this go like this?
Code: › $s = preg_replace($urlin, $urlout, $s);
return $s;
"gallery.html",
"gallery-page\\1.html",
"gallery.html",
"gallery-photo_\\1-\\2.html",
"gallery-album_\\1-page\\2.html",
"gallery-album_\\1.html"
} #End of Google Tap Header
I tried it and I just get a parse error!
The current code for the standard google tap I have in header.php is like this:
Code: › #Start of Google Tap Header
global $module_name;
// Google Tap On or Off, 1=On, 0=Off
$ob = 1;
if ($ob == 1) {
if (file_exists("GoogleTap/GT-".$module_name.".php")) {
ob_start();
} else {
$ob = 0;
}
}
function replace_for_mod_rewrite(&$s) {
global $module_name;
if (file_exists("GoogleTap/GT-$module_name.php")) {
include("GoogleTap/GT-$module_name.php");
}
$s = preg_replace($urlin, $urlout, $s);
return $s;
} #End of Google Tap Header
Any suggestions?
Cheers
PS. Nice work by the way, I have been dreaming about something like this for ages now 