vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   How to create your own vBulletin-powered page! (uses vB templates) (https://vborg.vbsupport.ru/showthread.php?t=62164)

amcd 12-19-2008 05:44 AM

<a href="https://vborg.vbsupport.ru/showpost.php?p=1681571&postcount=884" target="_blank">https://vborg.vbsupport.ru/showp...&postcount=884</a>

You don't listen to advice. You want to be spoon fed.

veenuisthebest 12-19-2008 07:04 AM

Quote:

Originally Posted by amcd (Post 1688525)
https://vborg.vbsupport.ru/showpost....&postcount=884

You don't listen to advice. You want to be spoon fed.

then who is asking you to bother lol

Can't you see $headinclude already consists $vboptions[keywords], [description]. Do you want me to give metainfo twice?

This cannot be achieved without a plugin where the meta variables needs to be replaced. Working on it.

amcd 12-19-2008 10:47 AM

Quote:

Originally Posted by veenuisthebest (Post 1688543)
then who is asking you to bother lol

Can't you see $headinclude already consists $vboptions[keywords], [description]. Do you want me to give metainfo twice?

This cannot be achieved without a plugin where the meta variables needs to be replaced. Working on it.

I am inclined to reply in a nasty tone but I will restrain myself. I won't 'bother'.

Digital Jedi 12-19-2008 05:01 PM

Quote:

Originally Posted by amcd (Post 1688667)
I am inclined to reply in a nasty tone but I will restrain myself. I won't 'bother'.

Too late.

Quote:

Originally Posted by amcd (Post 1688525)
https://vborg.vbsupport.ru/showpost....&postcount=884

You don't listen to advice. You want to be spoon fed.


edesi 12-21-2008 06:05 PM

Hello
I am trying to show another php file which generates a directory listing for some mp3 files along with the forum header and footer..
How can I show that php file's generated output in the template area?
I know i can use an iframe code in the template file but I am trying to avoid that. Is there any other way for me to accomplish this?

music.php
Code:


<?php

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

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'music'); // change this depending on your filename

// ################### 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(
    'music',
);

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

);

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

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

$navbits = array();
$navbits[$parent] = 'Music Downloads';

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('music') . '");');


?>

where can i put the other script's code? It's a pretty big script (135KB) named Andromeda.. maybe some of you know about it.

Chunky Monkey 12-22-2008 02:58 PM

Can somebody please explain how I can make the custom page show up in Currently Active Users? I read in this thread that you have to use plugins or hooks to accomplish this feat but I have no idea how I would go about it. Can anyone tell me specifically what code to add and where so that when you look on Current Active Users page you will see <custom page name> as the location users viewing the custom page are looking at?

Thank you!

Lynne 12-22-2008 03:26 PM

Quote:

Originally Posted by Chunky Monkey (Post 1691137)
Can somebody please explain how I can make the custom page show up in Currently Active Users? I read in this thread that you have to use plugins or hooks to accomplish this feat but I have no idea how I would go about it. Can anyone tell me specifically what code to add and where so that when you look on Current Active Users page you will see <custom page name> as the location users viewing the custom page are looking at?

Thank you!

This question has been covered in other articles and also out in the General vBulletin Discussions forum several times. I'll post the code here, if you need further help, you should post out there.

hook online_location_process:
Code:

PHP Code:

switch ($filename)
{
    case 
'mypage.php':
        
$userinfo['activity'] = 'mypage';
        break;
// add more cases here if you have more than one custom page. no need for multiple plugins. one plugin can handle all.



hook online_location_unknown
Code:

PHP Code:

switch ($userinfo['activity'])
{
    case 
'mypage':
        
$userinfo['where'] = '<a href="mypage.php?'.$vbulletin->session->vars[sessionurl].'">My Page</a>';
        
$userinfo['action'] = "Viewing My Page";
        
$handled true;
        break;
// add more cases here if you have more than one custom page. no need for multiple plugins. one plugin can handle all.



Chunky Monkey 12-22-2008 03:41 PM

Thank you but can you please tell me where to put that code?

Lynne 12-22-2008 05:31 PM

I did. Reread my post - I have the hook locations specified.

Chunky Monkey 12-22-2008 05:48 PM

I see. I didn't realize I had to go to Manage Plugins and create a new plugin. I've followed your instructions but the location is reading Unknown common/lists.css. Any idea as to why that might be happening?


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

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.03949 seconds
  • Memory Usage 1,755KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (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