vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Cerb's Custom Query Strings hack! (Looks awesome!) (https://vborg.vbsupport.ru/showthread.php?t=68678)

Cerb 08-23-2004 10:00 PM

Cerb's Custom Query Strings hack! (Looks awesome!)
 
Alright, this is really useless but it looks really cool.

First I'll explain what a query string is.

Well a query string is "additional page information" for instance index.php?page=forums&sid=1

Well the query string here is page=forums&sid=1

What this hack allows you to do is to replace this " = " and " &"


Instead of having (using the same example) index.php?page=forums&sid=1, you could have index.php?page:forums,sid:1

Yes, this IS useless, however it looks really cool and professional.

This is pretty long to install. You've got to open all your vB files and change every link, replacing ' = ' with $qs['eq'] and ' & ' with $qs['and']

For instance, replace:

Code:

"online.php?$session[sessionurl]sort=$sortfield&order=$sortorder&pp=$perpage"
with

Code:

"online.php?$session[sessionurl]sort".$qs['eq']."$sortfield".$qs['and']."order".$qs['eq']."$sortorder".$qs['and']."pp".$qs['eq']."$perpage"

Anyways, you understand. This is quite long. I think I'm going to eventually write a small application in C++ to do it for you. Anyways, if you have the time to do it, hope you'll enjoy your custom URL's :-D

Note that you can also use this on ANY php page, not only vB.


Then add this at the top of your global.php file, right after the <?php
PHP Code:

    $qs['eq'] = "="// Change me
    
$qs['and'] = "&amp;";  // Change me

        
$queryAND explode($qs['and'],$_SERVER["QUERY_STRING"]);

        for(
$i=0;$i<sizeof($queryAND);$i++)
        {
            
$queryEQ explode($qs['eq'],$queryAND[$i]);
            
$_GET$queryEQ[0] ] = $queryEQ[1];
        } 


EDIT: Fixed a mistake ^_^

streamzone 08-24-2004 08:43 PM

funny :) cool...
I'll install.. hope 2 housrs will be enought ;)
thx for the mastering

pjdaley 08-24-2004 08:45 PM

your a very interesting character Cerb. did you know that? lol

try to do some a bit more useful such as:

https://vborg.vbsupport.ru/showthread.php?t=68461


;)

MrNase 08-24-2004 09:05 PM

Do you have a demo? I just want to see how it could look like ;)

Cerb 08-24-2004 09:16 PM

Well MrNase, here's a text demo:

(Link wont work, dont click it)

http://www.bnfreak.com/portal.php?pa...d:20,session:1

You can change the ' = ' and ' & ' from your query strings, this looks very original :-)



pjdaley, I'm (probably tonight) going to release a language hack pretty much like ( I think ) uBB does.

For instance, I've had a Final Fantasy forum which I wanted to be in both french and english.

Well there was this thing you could set in your profile so you could view either french forums only, english forums only, or both :-)

dndog 08-24-2004 10:17 PM

Hotm! Hotm!

Who's with me? :rolleyes:

Cerb 08-24-2004 10:25 PM

Well it's just like 5 lines of code haha.

I was on fire when I wrote that though :-|

pjdaley 08-24-2004 11:52 PM

cerb, so my request is not in none of your interest? :rolleyes: :disappointed:

Cerb 08-25-2004 12:16 AM

To tell you the truth, I couldn't do it.

I am not familiar with vB at all.

I've released two hacks until now and they're plain PHP, they don't link to vB in any case.

So you might want to ask another programmer... I'm sorry

sabret00the 08-25-2004 12:58 PM

nice thread, welcome to the Borg Cerb :)


All times are GMT. The time now is 12:32 AM.

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.01030 seconds
  • Memory Usage 1,737KB
  • 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_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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