Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Nice URL's for coppermine  (Read 18341 times)

0 Members and 1 Guest are viewing this topic.

gtroll

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 618
    • CPG-Nuke
Nice URL's for coppermine
« on: September 30, 2003, 08:11:42 am »

2003-09-16 23:06

 I have been working on a googletap like nice url's for coppermine and been having a heck of a time with it. Has anyone already done this?
Thanks
Scott

[posting moved manually from sf.net project forums]

hyperion01

  • Guest
RE: Nice URL's for coppermine
« Reply #1 on: September 30, 2003, 08:12:26 am »

2003-09-17 05:26

 gtroll,

I cannot answer your question, but you might also ask it here:

http://sourceforge.net/projects/immaginuke

Best regards,

Hyperion01

[posting moved manually from sf.net project forums]
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
RE: Nice URL's for coppermine
« Reply #2 on: September 30, 2003, 08:13:10 am »

Logged
SANIsoft PHP applications for E Biz

gtroll

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 618
    • CPG-Nuke
Nice URL's for coppermine
« Reply #3 on: September 30, 2003, 08:13:50 am »

2003-09-20 10:59

 Yes I got a few rewrites working for my site but hoped someone might have done it already

[posting moved manually from sf.net project forums]

boii

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 65
Nice URL's for coppermine
« Reply #4 on: September 30, 2003, 10:52:36 am »

while i dont have any prewritten code, i dont think it would be too hard to do album rewrites for nice urls, ie:

instead of:
http://www.domain.com/copper/thumbnails.php?album=6

you get:
http://www.domain.com/copper/album/blackandwhite
or even:
http://www.domain.com/copper/?album=blackandwhite

i can probably whip that up in no time (though right now..i do have no time  :P )

itd be nice to have it for displayimage.php as well (word instead of id number). is that what you're asking about?

cheers.
ken
Logged

t3kn0byt3

  • Guest
Nice URL's for coppermine
« Reply #5 on: October 01, 2003, 03:51:53 am »

This may help.  This was taken from googlifier.
This is the code for the phpNuke port.


header.php
Code: [Select]
<?php 


if &#40;eregi&#40;"header.php",$_SERVER['PHP_SELF'&#93;&#41;&#41; &#123; 
    
Header&#40;"Location&#58; index.php"&#41;; 
    
die&#40;&#41;; 
&#125; 

ob_start&#40;&#41;; 

function replace_for_mod_rewrite&#40;&$s&#41; &#123; 
$urlin = array&#40; 

"'&#40;?<!/&#41;gate.html\?name=&#40;coppermine\"&#41;'"
"'&#40;?<!/&#41;gate.html\?name=coppermine&file=displayimage&album=&#40;[a-zA-Z&#93;*&#41;&cat=-&#40;[0-9&#93;*&#41;&pos=&#40;[0-9&#93;*&#41;'"
"'&#40;?<!/&#41;gate.html\?name=coppermine&file=displayimage&album=&#40;[0-9&#93;*&#41;&pos=&#40;[0-9&#93;*&#41;'"
"'&#40;?<!/&#41;gate.html\?name=coppermine&file=displayimage&album=&#40;[a-zA-Z&#93;*&#41;&cat=&pos=-&#40;[0-9&#93;*&#41;'"
"'&#40;?<!/&#41;gate.html\?name=coppermine&file=displayimage&album=&#40;[a-zA-Z&#93;*&#41;&cat=&pos=&#40;[0-9&#93;*&#41;'"
"'&#40;?<!/&#41;gate.html\?name=coppermine&file=displayimage&album=&#40;[a-zA-Z&#93;*&#41;&cat=&#40;[0-9&#93;*&#41;&pos=-&#40;[0-9&#93;*&#41;'"
"'&#40;?<!/&#41;gate.html\?name=coppermine&file=displayimage&album=&#40;[a-zA-Z&#93;*&#41;&cat=&#40;[0-9&#93;*&#41;&pos=&#40;[0-9&#93;*&#41;'"
"'&#40;?<!/&#41;gate.html\?name=coppermine&file=thumbnails&album=&#40;[a-zA-Z&#93;*&#41;&cat=-&#40;[0-9&#93;*&#41;&page=&#40;[0-9&#93;*&#41;'"
"'&#40;?<!/&#41;gate.html\?name=coppermine&file=thumbnails&album=&#40;[a-zA-Z&#93;*&#41;&cat=-&#40;[0-9&#93;*&#41;'"
"'&#40;?<!/&#41;gate.html\?name=coppermine&file=thumbnails&album=&#40;[a-zA-Z&#93;*&#41;&cat=&#40;[0-9&#93;*&#41;&page=&#40;[0-9&#93;*&#41;'"
"'&#40;?<!/&#41;gate.html\?name=coppermine&file=thumbnails&album=&#40;[a-zA-Z&#93;*&#41;&cat=&#40;[0-9&#93;*&#41;'"
"'&#40;?<!/&#41;gate.html\?name=coppermine&file=thumbnails&album=&#40;[0-9&#93;*&#41;&page=&#40;[0-9&#93;*&#41;&sort=&#40;[a-z&#93;*&#41;'"
"'&#40;?<!/&#41;gate.html\?name=coppermine&file=thumbnails&album=&#40;[0-9&#93;*&#41;&page=&#40;[0-9&#93;*&#41;'"
"'&#40;?<!/&#41;gate.html\?name=coppermine&file=thumbnails&album=&#40;[0-9a-zA-Z&#93;*&#41;'"
"'&#40;?<!/&#41;gate.html\?name=coppermine&file=profile&uid=&#40;[0-9&#93;*&#41;'"
"'&#40;?<!/&#41;gate.html\?name=coppermine&cat=&#40;[0-9&#93;*&#41;'"
"'&#40;?<!/&#41;gate.html\?name=coppermine&file=index'",
&
#41;;

$urlout = array&#40; 
"photogallery.html\""
"image_\\1-\\2-\\3.html"
"image_\\1-\\2.html"
"image-\\1-\\2.html"
"image_\\1-\\2.html"
"image-\\1-\\2-\\3.html"
"image_\\1\\2-\\3.html"
"gallery-\\1-\\2-\\3.html"
"gallery-\\1-\\2.html"
"gallery_\\1-\\2-\\3.html"
"gallery_\\1-\\2.html"
"gallery_\\1-\\2-\\3.html"
"gallery_\\1-\\2.html"
"gallery_\\1.html"
"gallery_user-\\1.html"
"user_galleries-\\1.html"
"gallery.html"

&#41;; 

$s preg_replace&#40;$urlin, $urlout, $s&#41;; 
return $s
&
#125; 

require_once&#40;"mainfile.php"&#41;; 

$header 1

function 
head&#40;&#41; &#123; 
    
global $slogan$sitename$banners$nukeurl$Version_Num$artpage$topic$hlpfile$user$hr$theme$cookie$bgcolor1$bgcolor2$bgcolor3$bgcolor4$textcolor1$textcolor2$forumpage$adminpage$userpage$pagetitle
    
$ThemeSel get_theme&#40;&#41;; 
    
include&#40;"themes/$ThemeSel/theme.php"&#41;; 
    
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"
    echo 
"<html>\n"
    echo 
"<head>\n"
    echo 
"<title>$sitename $pagetitle</title>\n"

    include&
#40;"includes/meta.php"&#41;; 
    
include&#40;"includes/javascript.php"&#41;; 
    
    
if &#40;file_exists&#40;"themes/$ThemeSel/images/favicon.ico"&#41;&#41; &#123; 
   
echo "<link REL=\"shortcut icon\" HREF=\"themes/$ThemeSel/images/favicon.ico\" TYPE=\"image/x-icon\">\n"
    &
#125; 
        
    
echo "<LINK REL=\"StyleSheet\" HREF=\"themes/$ThemeSel/style/style.css\" TYPE=\"text/css\">\n\n\n"
    include&
#40;"includes/my_header.php"&#41;; 
    
echo "\n\n\n</head>\n\n"
    
themeheader&#40;&#41;; 
&#125; 

online&#40;&#41;; 
head&#40;&#41;; 
include&#40;"includes/counter.php"&#41;; 
global $home
if &
#40;$home == 1&#41; &#123; 
    
message_box&#40;&#41;; 
    
blocks&#40;Center&#41;; 
&#125; 

?>



.htaccess
Code: [Select]
DirectoryIndex index.php index.cgi index.pl index.shtml index.html

<Limit GET PUT POST>
order allow,deny
allow from all
</Limit>

# deny most common except .php
<FilesMatch "\.(inc|tpl|h|ihtml|sql|ini|conf|class|bin|spd|theme|module|exe)$">
deny from all
</FilesMatch>

#Disable .htaccess viewing from browser
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</Files>

<Files ~ "\config.php$">
deny from all
</Files>

# change to yoursite.com
ErrorDocument 404 http://www.lbd1956.com/index.html

RewriteEngine On

RewriteRule ^index.html index.php

RewriteRule ^gate.* modules.php

#Coppermine
RewriteRule ^image_([a-zA-Z]*)-([0-9]*)-([0-9]*).html gate.html?name=coppermine&file=displayimage&album=$1&cat=-$2&pos=$3
RewriteRule ^image_([0-9]*)-([0-9]*).html gate.html?name=coppermine&file=displayimage&album=$1&pos=$2
RewriteRule ^image-([a-zA-Z]*)-([0-9]*).html gate.html?name=coppermine&file=displayimage&album=$1&cat=&pos=-$2
RewriteRule ^image_([a-zA-Z]*)-([0-9]*).html gate.html?name=coppermine&file=displayimage&album=$1&cat=&pos=$2
RewriteRule ^image-([a-zA-Z]*)-([0-9]*)-([0-9]*).html gate.html?name=coppermine&file=displayimage&album=$1&cat=$2&pos=-$3
RewriteRule ^image_([a-zA-Z]*)([0-9]*)-([0-9]*).html gate.html?name=coppermine&file=displayimage&album=$1&cat=$2&pos=$3
RewriteRule ^gallery-([a-zA-Z]*)-([0-9]*)-([0-9]*).html gate.html?name=coppermine&file=thumbnails&album=$1&cat=-$2&page=$3
RewriteRule ^gallery-([a-zA-Z]*)-([0-9]*).html gate.html?name=coppermine&file=thumbnails&album=$1&cat=-$2
RewriteRule ^gallery_([a-zA-Z]*)-([0-9]*)-([0-9]*).html gate.html?name=coppermine&file=thumbnails&album=$1&cat=$2&page=$3
RewriteRule ^gallery_([a-zA-Z]*)-([0-9]*).html gate.html?name=coppermine&file=thumbnails&album=$1&cat=$2
RewriteRule ^gallery_([0-9]*)-([0-9]*)-([a-z]*).html gate.html?name=coppermine&file=thumbnails&album=$1&page=$2&sort=$3
RewriteRule ^gallery_([0-9]*)-([0-9]*).html gate.html?name=coppermine&file=thumbnails&album=$1&page=$2
RewriteRule ^gallery_([0-9a-zA-Z]*).html gate.html?name=coppermine&file=thumbnails&album=$1
RewriteRule ^gallery_user-([0-9]*).html gate.html?name=coppermine&file=profile&uid=$1
RewriteRule ^user_galleries-([0-9]*).html gate.html?name=coppermine&cat=$1
RewriteRule ^gallery.html gate.html?name=coppermine&file=index
Logged

t3kn0byt3

  • Guest
Nice URL's for coppermine
« Reply #6 on: October 01, 2003, 03:59:30 am »

Forgot this...

footer.php
Code: [Select]
<?php



if &#40;eregi&#40;"footer.php",$PHP_SELF&#41;&#41; &#123;
    
Header&#40;"Location&#58; index.php"&#41;;
    
die&#40;&#41;;
&#125;

$footer 1;

function 
footmsg&#40;&#41; &#123;
    
global $foot1$foot2$foot3$copyright$total_time$start_time;
    
$mtime microtime&#40;&#41;;
    
$mtime explode&#40;" ",$mtime&#41;;
    
$mtime $mtime[1&#93; + $mtime[0&#93;;
    
$end_time $mtime;
    
$total_time = &#40;$end_time - $start_time&#41;;
    
$total_time ""._PAGEGENERATION." ".substr&#40;$total_time,0,5&#41;." "._SECONDS."";
    
echo "<font class=\"footmsg\">\n";
    if &
#40;$foot1 != ""&#41; &#123;
        
echo "$foot1<br>\n";
    &
#125;
    
if &#40;$foot2 != ""&#41; &#123;
        
echo "$foot2<br>\n";
    &
#125;
    
if &#40;$foot3 != ""&#41; &#123;
        
echo "$foot3<br>\n";
    &
#125;
    // DO NOT REMOVE THE FOLLOWING COPYRIGHT LINE. YOU'RE NOT ALLOWED TO REMOVE NOR EDIT THIS.
    
echo "$copyright<br>$total_time<br>\n</font>\n";
&
#125;

function foot&#40;&#41; &#123;
    
global $prefix$user_prefix$dbi$index$user$cookie$storynum$user$cookie$Default_Theme$foot1$foot2$foot3$foot4$home$module$name;
    if &
#40;$home == 1&#41; &#123;
        
blocks&#40;Down&#41;;
    
&#125;
    
if &#40;$module == 1 AND file_exists&#40;"modules/$name/copyright.php"&#41;&#41; &#123;
        
$cpname ereg_replace&#40;"_", " ", $name&#41;;
        
echo "<div align=\"right\"><a href=\"javascript&#58;openwindow&#40;&#41;\">$cpname &copy;</a></div>";
    &
#125;
    
themefooter&#40;&#41;;
    
echo "</body>\n"
        
."</html>";
&
#125;

foot&#40;&#41;;

$contents ob_get_contents&#40;&#41;; // store buffer in $contents
ob_end_clean&#40;&#41;; // delete output buffer and stop buffering
echo replace_for_mod_rewrite&#40;$contents&#41;; //display modified buffer to screen
global $dbg_starttime;

?>
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Nice URL's for coppermine
« Reply #7 on: October 01, 2003, 06:07:50 am »

If all the rigamarole is just for getting Indexed in Google - don't bother Google indexs Coppermine pages just fine

Try a google search for "coppermine tarique"
Logged
SANIsoft PHP applications for E Biz

copperminerules

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Nice URL's for coppermine
« Reply #8 on: October 04, 2003, 03:55:09 am »

I call upon everyone's collective knowlege for the following question.  I am EXTREMELY interested in the friendly url system but i run a coppermine version that is not part of a phpnuke portal i.e. the stand-alone version.

can i do the same thing as you outlined here?  im a bit web design slow (not stupid) so i still need simple instrctions etc.
Logged

Rodinou

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 346
  • Tournicoti, Tournicota
    • http://www.sortons.net
Nice URL's for coppermine
« Reply #9 on: October 04, 2003, 11:49:27 pm »

Very interested too (but standalone version)

Indeed, It would be nice ...

www.domain.com/copper_folder/name_of_album/name_of_the_gallery/

It's more simple to do (in my case)

If you want to see the photos go to

www.sortons.net/photos/exo7/soiree_haiwaienne

and not www.sortons.net/photos/thumbnails.php?album=blabla

Oasis

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 252
  • iNSiGNiA
    • Pixnet Gallery
Nice URL's for coppermine
« Reply #10 on: October 05, 2003, 10:13:48 am »

This should be fairly easy to implement. I have already done this successfully for user albums, so http://mydomain.com/cpgfolder/username goes to the users' private gallery, so doing the same thing for albums should be a piece of cake. Take a look at the thread "another question (regarding user album urls)" in the cpg1.1 category.

[edit GauGau]made your link clickable[/edit]
Logged
Pixnet Gallery: http://www.pixnet.net
iNSiGNiA Weblog: http://www.jayliu.org
Pages: [1]   Go Up
 

Page created in 0.055 seconds with 20 queries.