vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=262)
-   -   VB 4 to 5 & VBseo (https://vborg.vbsupport.ru/showthread.php?t=322844)

DouglasUK 08-17-2016 10:15 AM

Quote:

Originally Posted by bridge2heyday (Post 2572139)
Well , this will require one or two file edits
in file 'includes/vb5/frontend/routing.php'
line 239 just before throwing
PHP Code:

throw new vB5_Exception_404("invalid_page_url"); 

I have made some work
I used $path variable , exploded it and got the last element .. then queried node table for urlident equal to this value .
if true .. this returns node id
Then
PHP Code:

$url vB_Api::instanceInternal('route')->getAbsoluteNodeUrl($id); 
header('Location: ' $urltrue301);
exit; 

I did this for a client who converted from smf with pretty URLs and working fine
I will post the full code when I have access to my home PC tomorrow.
Note : if the URL doesn't end with '/' you have to do additional work in includes\api\interface\collapsed.php'

Is there any chance you could post your query, too, please? I am new to programming vb5 and while I could work it out, you know how many days that could take me over simply seeing what you are doing and learning the quick way. So, if you have the full code for your solution, that would be ideal.


All times are GMT. The time now is 03:02 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.00989 seconds
  • Memory Usage 1,721KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete