Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-22-2013, 01:20 PM
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default shorten user profile url

I'm having hard time trying to shrink users profile url for vb 4.2.1 like this:

from
PHP Code:
mydomain.com/member.php?u=330 
to

PHP Code:
mydomain.com/admin 
so basically I want to remove member.php and the id number and leave only the username...

any idea how to do that??

Thanks
Reply With Quote
  #2  
Old 09-22-2013, 02:01 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please check the articles section because there is an article on how to do this (although it may have /members in the URL, I can't remember, but you can modify it for your own purposes).
Reply With Quote
  #3  
Old 09-22-2013, 02:20 PM
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks @Lynne for the comments.

any idea what articles section that would be??? is it articles vb4??

because I search around, but got nothing so far...
Reply With Quote
  #4  
Old 09-22-2013, 03:26 PM
goxy63 goxy63 is offline
 
Join Date: Oct 2008
Location: its like another planet:D
Posts: 657
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

do a good search omg
https://vborg.vbsupport.ru/showthread.php?t=165986
Reply With Quote
  #5  
Old 09-22-2013, 10:52 PM
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by goxy63 View Post
Thanks@goxy,

I think I mentioned I use vb4.2.1 and that article is for vb3. I also tried to adjust the instructions there and apply it on my vb4, but didn't work. There are some major differences and because of that the article you provided is out-dated one.

Thanks for trying anyways.

Anyone has an idea how to fix this??
Reply With Quote
  #6  
Old 09-23-2013, 08:41 AM
goxy63 goxy63 is offline
 
Join Date: Oct 2008
Location: its like another planet:D
Posts: 657
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You should read whole article, that is rewrite code and does not matter what version of VB u have its rewriting URLs. You need to find a way to adjust it to your site, try it out bit more sure it will work if you find right code.

I will try it out also these days, planing to do so after "mod rewrite" my urls
Reply With Quote
  #7  
Old 09-24-2013, 01:19 PM
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by goxy63 View Post
You should read whole article, that is rewrite code and does not matter what version of VB u have its rewriting URLs. You need to find a way to adjust it to your site, try it out bit more sure it will work if you find right code.

I will try it out also these days, planing to do so after "mod rewrite" my urls
I did, I read the article many times, but it seems that some function don't exist anymore. Besides, the following code can't do anything since $username variable have no affect on
vb url as I tested it.


PHP Code:
RewriteEngine On
RewriteCond 
%{REQUEST_FILENAME} !-f
RewriteCond 
%{REQUEST_FILENAME} !-d
RewriteRule 
^(.*)$ http://www.mydomain.com/forums/blog.php?username=$1 [R] 
I believe there must be a way how to do this using .htaccess only, but not sure how??

VB support should know this, I guess...
Reply With Quote
  #8  
Old 09-24-2013, 11:14 PM
goxy63 goxy63 is offline
 
Join Date: Oct 2008
Location: its like another planet:D
Posts: 657
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes they probably do but this is not VB default code and you can forget about their help, they have better things to do and this is not part of their job

try to find how to do it by yourself and share it here, best way share it in that thread as its all about that and has more info about it than this one.

I just try it out had no changes on my side

good luck
Reply With Quote
  #9  
Old 09-25-2013, 05:14 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Doing rewrites is a trial and error thing for me. I google it and then test it on my test site until I get it right.
Reply With Quote
  #10  
Old 09-25-2013, 07:08 PM
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
Doing rewrites is a trial and error thing for me. I google it and then test it on my test site until I get it right.
Great to hear that, but would you mind sharing how you solved it, please??

Thanks in advance, Lynne.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:42 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07020 seconds
  • Memory Usage 4,723KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete