Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post Mod_rewrite Make_url_friendly For Users 
 
Hey there...

i have had spend some hours to figure my problem out... also searched alot, but can find any docs about that...

Icy Phoenix has his own make_url_friendly function...
Quote:
includes/functions_rewrite.php
        // Profile
        '/(?<!\/)(.\/){0,1}' . PROFILE_MG . '\?mode=viewprofile((&)|(&)){0,1}' . POST_USERS_URL . '=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',

        // Profile
        "make_url_friendly('\\10') . '-profile-u\\5.html' . if_query('\\6') . stripslashes('\\9\\10') . '</a>'",
.htaccess
RewriteRule ^.+-profile-u([0-9]*) ./profile.php?mode=viewprofile%{QUERY_STRING}&u=$1 [L]


I have changed this a bit, and have ATM this:
Quote:
includes/functions_rewrite.php
        // Profile
        '/(?<!\/)(.\/){0,1}' . PROFILE_MG . '\?mode=viewprofile((&)|(&)){0,1}' . POST_USERS_URL . '=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',

        // Profile
        "make_url_friendly('\\10') . '-user\\5' . if_query('\\6') . stripslashes('\\9\\10') . '</a>'",
.htaccess
RewriteRule ^.+-user([0-9]*) ./profile.php?mode=viewprofile%{QUERY_STRING}&u=$1 [L]

Which results in: http://www.domain.com/NICKNAME-user2

But i want to have it like this (i need this for an dynamic image):
http://www.domain.com/member/NICKNAME/

I´ve played a bit with the make_url_friendly function to achieve that... the rewrite was ok, but the images on the profile were not displayed... due to the "member"-path

The next thing is... i dont really know for what the "\\10" | "\\6" in the make_url_friendly function stand for...

anyone can help me with that please?
 




____________

Play Games at GamesCampus!
 
KugeLSichASend private messageVisit poster's website  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: Mod_rewrite Make_url_friendly For Users 
 
The main problem is that / is considered as path separator. So you must change the IMG base location, otherwise the browser won't be able to locate files.
 



 
InformproSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Mod_rewrite Make_url_friendly For Users 
 
Informpro wrote: [View Post]
The main problem is that / is considered as path separator. So you must change the IMG base location, otherwise the browser won't be able to locate files.


yupp... thats the problem...

i found a solution for this...

{FULL_SITE_PATH}{EMAIL_IMG}

then the image is correct... but i need to add this to all templates which are loaded on the profile, overall_header, overall_footer, profile_view_body

thats a lot of work...

so i was asking here if the is maybe a better/easier way...
 




____________

Play Games at GamesCampus!
 
KugeLSichASend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Mod_rewrite Make_url_friendly For Users 
 
Try to look at the .cfg file.
 



 
InformproSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Mod_rewrite Make_url_friendly For Users 
 
Informpro wrote: [View Post]
Try to look at the .cfg file.


The images are not the only problem... also Urls are not working...

I know MG dont like the Mod_rewrite thing... but maybe he have a solution for this... (and/or someone else)  
 




____________

Play Games at GamesCampus!
 
KugeLSichASend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Mod_rewrite Make_url_friendly For Users 
 
You need a special PHP file to be able to manage those links.

It's not so quick to explain how to deal, I can suggest the HTACCESS part:

Code: [Download] [Hide] [Select]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /ip/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /ip/users/index.php [L]
</IfModule>


So you can recall users from the "users" subfolder (for example: kugel.com/users/kugel/) but then you need to strip last subfolder and be able to query the value from users table (maybe the username_clean).

As I said, it's not quick and requires dealing with both HTACCESS and PHP code.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron