vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > Add-On Modules & Modifications > Module & Modification Discussion & Requests

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-25-2007, 04:49 PM
theMusicMan's Avatar
theMusicMan theMusicMan is offline
Senior Member
 
Join Date: May 2004
Posts: 491
Default Passing username within a module as $bbuserinfo[username]

Hi All

I want to pass the members username to an external php app running inside of a vBA PHP Module in the /modules directory and so far I have been trying this:

$bbuserinfo[username]

... and the code I am using to test the output is:

PHP Code:
 echo "bbuserinfo = "."$bbuserinfo[username]"
which doesn't work
PHP Code:
 echo "bbuserinfo = ".$bbuserinfo[username]; 
which also doesn't work

... but when I echo the output of this to see if it returns the username of the member who has clicked on the link, I see blank.

Is this the correct syntax pls...?

In a little more detail, what I want to be able to do is to pass the vB Username value to a PHP script from a link somewhere on my site. This link would normally be in the header or navbar, but could effectively be in a post too.

I want the Username value to be available within this script.

I have done this from the root of my site on a link in the navbar by using a <form> statement thus:

Code:
    <form name="tmpFinalsform" action="http://www.themouthpiece.com/predict/index.php" method="post" target="_blank">
        <input type="hidden" name="username" value="$bbuserinfo[username]"/>
    </form>
then using the following in a <td>

Code:
<td class="vbmenu_control"><a href="#" onclick="if (document.forms['tmpFinalsform'].username.value=='Unregistered') {alert('Only Registered Members may participate in the Predictions contest. Feel free to sign up and try again.');} else {document.forms['tmpFinalsform'].submit();}">tMP Predictions</a></td>
This passes my members username through to the application called via the link - and works.

However, I have moved this code into a the modules subdirectory within vB and it no longer works and I can't fathom out why.

Any ideas?
__________________
John
www.theMouthPiece.com - Brass music discussion
www.reflectingme.com - gallery
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Top Referrers module on home page by username? maxwolfie Module & Modification Discussion & Requests 1 05-23-2007 02:08 PM
Username in a module and title yuriy "How Do I..." Questions 2 11-11-2006 04:22 PM
remove the username and time/date stamp from news module teezdesigns "How Do I..." Questions 2 09-04-2006 07:00 PM
Show a members username on a module? ERuiz Troubleshooting / "How do I..." Questions 1 02-26-2005 01:38 PM
How do I dropdown username? khaleel Add-On Modules & Modifications 3 10-14-2004 03:46 PM


All times are GMT -4. The time now is 05:38 AM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.