vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Help please (https://vborg.vbsupport.ru/showthread.php?t=315863)

DJ-Dez 12-06-2014 07:41 AM

Help please
 
Hey guys,

Using some MEMBERINFO code in a custom template, however when I go to load that custom template, all data is blank so obviously variables aren't being copied over. Could anyone point me in the right direction on how to fix this please?

Thank you

ForceHSS 12-06-2014 08:48 AM

No one can help if they don't see the code

DJ-Dez 12-06-2014 09:09 AM

Quote:

Originally Posted by ForceHSS (Post 2525984)
No one can help if they don't see the code

It's just the whole MEMBERINFO template in a custom made template right now linked from a PHP file, but obviously the right variables aren't there so the data is blank.

ForceHSS 12-06-2014 09:13 AM

you need to give more info on how you linked it etc etc

DJ-Dez 12-06-2014 04:12 PM

Ok:

Using popup.php:

Quote:

<?php

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

// #################### DEFINE IMPORTANT CONSTANTS #######################

define('THIS_SCRIPT', 'test');
define('CSRF_PROTECTION', true);
// 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('TEST',
);

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

// ######################### REQUIRE BACK-END ############################
// if your page is outside of your normal vb forums directory, you should change directories by uncommenting the next line
// chdir ('/path/to/your/forums');
require_once('global.php');

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

$navbits = construct_navbits(array('' => 'Test Page'));
$navbar = render_navbar_template($navbits);

// ###### YOUR CUSTOM CODE GOES HERE #####
$pagetitle = 'Pop Up Profile';

// ###### NOW YOUR TEMPLATE IS BEING RENDERED ######

?>
And that links to the style which is called popup-profile
We have it set up were you click somebodys name and it'll popup, that all works, we just need to get user profile fields working in popup-profile but we don't know what to call or add to make this work.

Thanks in advance

Lynne 12-06-2014 04:53 PM

That is what is in your popup.php page? And then you copied the MEMBERINFO template into the TEST template? If so, you need to put all the code into that popup.php page to define all the variables used in the TEST template.


All times are GMT. The time now is 03:38 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.00954 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete