View Full Version : Help please
DJ-Dez
12-06-2014, 07:41 AM
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
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:
<?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.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.