PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Trying to make a popup information

s2Member Plugin. A Membership plugin for WordPress®.

Trying to make a popup information

Postby s2pidkaspr » January 1st, 2012, 12:37 am

hello,

im trying to make a popup kind of viewing profile.
like where members can click on view their ACCOUNT INFO and when they clicked on it, it will display as a popup filled with their membership information such as, avatar, username, membership status, membership expiring date, and so on...

And so what i tried to do is, make a new file named "account-info.php" and placed it over to my file directories.
then made a link somewhere on my site with this code

Code: Select all
<a href="javascript:void(window.open('http://www.MYDOMAIN.com/wp-content/themes/MYTHEME/account-info.php','accountinfo','width=600,height=350,top=200,left=365'))">Account Info</a>


The link works fine and it pops up a new window connecting to that "account-info.php"
But the thing is, whenever I put in php codes inside that file (account-info.php), the pop up gives undefined error.

And so this is my question, how to do this? So that I can have my member's informations as a popup window from their membership and so on? Basically, how can i make php work on that new file i created? Because it seems php is not available to use in that file, or maybe its because its outside the loop? Hmm.
User avatar
s2pidkaspr
Registered User
Registered User
 
Posts: 48
Joined: August 6, 2011

Re: Trying to make a popup information

Postby s2pidkaspr » January 1st, 2012, 4:32 pm

bump^^

anyone ?
User avatar
s2pidkaspr
Registered User
Registered User
 
Posts: 48
Joined: August 6, 2011

Re: Trying to make a popup information

Postby Deyson » January 3rd, 2012, 8:39 am

I am curious about this as well, it would be a nice link to add next to the sign up widget.
User avatar
Deyson
Registered User
Registered User
 
Posts: 67
Joined: December 28, 2010

Re: Trying to make a popup information

Postby s2pidkaspr » January 3rd, 2012, 1:53 pm

still waiting for any kind of support about this idea. :)
User avatar
s2pidkaspr
Registered User
Registered User
 
Posts: 48
Joined: August 6, 2011

Re: Trying to make a popup information

Postby Raam Dev » January 3rd, 2012, 5:43 pm

The problem is that you're probably not loading any of the WordPress framework in that PHP file, so anything s2Member-related will not work.

You can try adding this to the top of your PHP file before anything else:

Code: Select all
<?php
    
// Include WordPress
    define('WP_USE_THEMES', false);
    // Change path below to location of wp-blog-header.php on server
    require('/home/username/public_html/blog/wp-blog-header.php');
?>


If that still doesn't work, please paste here the exact error you're receiving.
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: Trying to make a popup information

Postby Cristián Lávaque » January 5th, 2012, 3:37 am

This is a similar approach. viewtopic.php?f=4&t=3145&p=9683#p9683
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Trying to make a popup information

Postby s2pidkaspr » January 5th, 2012, 5:26 pm

@raam

that works perfect ;)
very much thanks to you happy new year
User avatar
s2pidkaspr
Registered User
Registered User
 
Posts: 48
Joined: August 6, 2011

Re: Trying to make a popup information

Postby Raam Dev » January 5th, 2012, 6:39 pm

You're most welcome! Glad it worked. :) Happy new year!
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 2 guests

cron