Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Unknown Location Details »»
Unknown Location
Version: 1.0.2, by nfn nfn is offline
Developer Last Online: May 2012 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.7.5 Rating:
Released: 02-01-2008 Last Update: 02-25-2008 Installs: 227
Uses Plugins
Translations  
No support by the author.

Description:

This modification will let you define a name for your external files replacing the Unknown Location message, usually in Who's Online & Members Profile pages.

Tested With:
  • vBulletin 3.6.8
  • vBulletin 3.7.0 Beta 4
Changes:
  • [v1.0.2] fix a minor bug and support for multiple queries.
  • [v1.0.1] added a 3rd optional parameter to identify the page with a query string.
  • [v1.0.0] first release.
Installation & Upgrade Instructions:

Upload the product & configure the settings for the product Unknown Location.

Notes:

The location of your files are relative to you web root.
With multiple queries, using the standalone file simultaneously, you must ensure that the standalone file comes first:

/file.php:My File
/file.php?do=hello:My Hello:do=hello
/file.php?do=hello&do=goodbye:My Goodbye:do=goodbye

The change is made in the "online_location_unknown" hook. If your page doesn't call this hook, nothing will be changed. To know wich hooks are called, run your board with debug mode on.

How to Use:

File Name:Page Name:Optional Parameter for Query String

/portal.php:Portal
/forum/misc.php:Misc Page
/forum/misc.php?do=hello:Hello:do=hello (using 3rd parameter for misc.php?do=hello)
/forum/misc.php?do=thanks&do=something:Thanks:do=thanks (using 3rd parameter for misc.php?do=thanks)

Please Mark as Installed!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 02-08-2008, 05:27 PM
testebr testebr is offline
 
Join Date: Jan 2004
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nfn View Post
Hi,

If domain.com/forum/index.php is you default index for you board, the title will not be changed.
Where can I get the stats mod you are using to test myself?
No stats mod, this is a custom page made by me. But you can test with this example:

/irc_stats/index.php

PHP Code:
<?php

// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// ##################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT''irc_stats');

// #################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(
);

// get special data templates from the datastore
$specialtemplates = array(
);

// pre-cache templates used by all actions
$globaltemplates = array(
        
'irc_stats',
);

// pre-cache templates used by specific actions
$actiontemplates = array();

// ########################## REQUIRE BACK-END ############################
//require_once('./global.php'); // only if use in same board folder

define('patch_crazy', (($getcwd getcwd()) ? $getcwd '.'));

chdir("/home/change/to/your/board/patch");
require_once(
'./global.php');
chdir(patch_crazy);

global 
$vbulletin;

// #################### HARD CODE JAVASCRIPT PATHS ########################
$headinclude str_replace('clientscript'$vbulletin->options['bburl'] . '/clientscript'$headinclude);

// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################

$irc_stats 'just one test to unkown location mod';

$navbits = array(); 
$navbits[$parent] = 'IRC STATS';
$navbits construct_navbits($navbits);

eval(
'$navbar = "' fetch_template('navbar') . '";');
eval(
'print_output("' fetch_template('irc_stats') . '");');

?>
*Edit your board patch in code.

template 'irc_stats'

HTML Code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>IRC Stats - $vboptions[bbtitle]</title>
</head>
<body>
$header
$navbar

$irc_stats

$footer

</body>
</html>
Reply With Quote
  #23  
Old 02-09-2008, 11:31 AM
nfn nfn is offline
 
Join Date: Feb 2007
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

I've tested your page and the problem is since (somehow) it gets the default board name, and this mod is executed inside the online_location_unknown, this hook is never called.

This is not a problem of this modification. The problem might be with the path's of your file:

Code:
define('patch_crazy', (($getcwd = getcwd()) ? $getcwd : '.'));

chdir("/home/myname/public_html/testvb");
require_once('./global.php');
chdir(patch_crazy);
I've tested you file in the same directory as the default vB pages removing all above stuff and just using:

Code:
require_once('./global.php');

and it works!

i have two external files similar to your's in the same place as vB files and these are working.
Reply With Quote
  #24  
Old 02-13-2008, 05:37 AM
testebr testebr is offline
 
Join Date: Jan 2004
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, I know, but I need to place this file in main domain.

If not is possible, ok no problem.

Thank you, very useful mod.
Reply With Quote
  #25  
Old 02-13-2008, 08:46 AM
nfn nfn is offline
 
Join Date: Feb 2007
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@testebr: You're Welcome!
Reply With Quote
  #26  
Old 02-13-2008, 11:08 AM
testebr testebr is offline
 
Join Date: Jan 2004
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello again nfn,

My problem was solved

The solution is simple.

First I created this new plugin at hook online_location_preprocess:

PHP Code:
if ($loc == '/irc_stats/')
{
    
$filename 'irc_stats.php';

Now, the hook online_location_unknown will be called with success because the $filename irc_stats.php is not in default list of filenames like you can see in file includes/functions_online.php.

And in options of your plugin I used this entry:

Code:
/irc_stats/:title
Maybe you can add some solution in your plugin like my idea.

Bye
Reply With Quote
  #27  
Old 02-22-2008, 06:08 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When I use this:

/forums/info.php:Site Map:do=sitemap

It shows the link like it should but when you click on the link, it only clicks to /forums/info.php without the do=sitemap.
Reply With Quote
  #28  
Old 02-23-2008, 07:59 PM
Veer Veer is offline
 
Join Date: Feb 2006
Posts: 733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

/index.php?act=Arcade&do=newscore:Saving New Score

doesn't work.
Reply With Quote
  #29  
Old 02-24-2008, 01:26 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Pehchaan View Post
/index.php?act=Arcade&do=newscore:Saving New Score

doesn't work.
Hopefully, we'll get an answer soon to this.
Reply With Quote
  #30  
Old 02-24-2008, 02:56 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Pehchaan View Post
/index.php?act=Arcade&do=newscore:Saving New Score

doesn't work.
Ok, I fixed this now so it will work with the second variable (example: info.php?do=sitemap).

In the XML file:

Find:

Code:
$userinfo['action'] = $vbphrase[ul_viewing]. ' <a href="' .$ul_file[0]. '" title="' .$ul_file[1]. '">' .$ul_file[1]. '</a>';
REPLACE it with:

Code:
$userinfo['action'] = $vbphrase[ul_viewing]. ' <a href="' .$ul_file[0].'?'.$ul_file[2]. '" title="' .$ul_file[1]. '">' .$ul_file[1]. '</a>';
The fix was there, he just forgot to add it variable to the link line.
Reply With Quote
  #31  
Old 02-26-2008, 08:29 PM
nfn nfn is offline
 
Join Date: Feb 2007
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

The fix you provide will do it ONLY if you have one query.
I just updated the modification with a minor fix and support for multiple queries.

Note that now you will need to place the full page (file & query) in the first parameter as explained in the first post.
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 06:21 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09594 seconds
  • Memory Usage 2,329KB
  • Queries Executed 25 (?)
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
  • (5)bbcode_code
  • (1)bbcode_html
  • (2)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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