Jump to content

Recommended Posts

Hello there ,

 

I am an Admin of a vBulletin board, and I never seem to get any support on the official site

 

So, What I want is a command.PHP sort of script.

 

We are a Habbo based forum, and what I want is a custom profile field (I know how to do that) which once the user enters a bit of text, it put it into a specific area of a URL

 

Ill show you

 

The url to start with, should hopefully be something like

http://www.habbo.co.uk/habbo-imaging/avatarimage?user=[**THE BiT WHERE WE WANT THE TEXT TO BE PLACED**]&action=wav&direction=3000003&head_direction=2999995&gesture=sml&size=s

 

So, the user puts sburns1992 into that field and it would make that url look like this

 

http://www.habbo.co.uk/habbo-imaging/avatarimage?user=sburns1992&action=wav&direction=3000003&head_direction=2999995&gesture=sml&size=s

 

 

Any idea how to do that?

 

Cheers

 

Jake

Link to comment
https://forums.phpfreaks.com/topic/165509-php-to-add-into-url/
Share on other sites

Right

 

We have a Custom Profile Field set up on our forum for a Habbo name

 

Now, upon registration the user is required to enter this, and once they do we hope we can make it show up on the users postbit

 

I just need the PHP script for this operation,

 

I want the outcome to be this...

 

Once the new registered put his/her name, I want it to go like this

 

say, Phpfreaks.com was the starting point, I want whatever is put in the profile field to appear like this

 

phpfreaks.com/whateverisputhere

 

Is that easier, Its not a form but for Custom Profiule Foelds

Link to comment
https://forums.phpfreaks.com/topic/165509-php-to-add-into-url/#findComment-872934
Share on other sites

If I go by your initial post... you just have to echo out the field in the database.

 

ie.

 

echo '<img src="http://www.habbo.co.uk/habbo-imaging/avatarimage?user='.$_DB-FIELD-OF-IMAGE.'&action=wav&direction=3000003&head_direction=2999995&gesture=sml&size=s"/>';

Link to comment
https://forums.phpfreaks.com/topic/165509-php-to-add-into-url/#findComment-873123
Share on other sites

If I go by your initial post... you just have to echo out the field in the database.

 

ie.

 

echo '<img src="http://www.habbo.co.uk/habbo-imaging/avatarimage?user='.$_DB-FIELD-OF-IMAGE.'&action=wav&direction=3000003&head_direction=2999995&gesture=sml&size=s"/>';

 

Right, We seem to be getting somewhere!!

 

Now, How do I implement that into a vBulletin Custom Field..?

I have tried putting it into the Regular Expression box,

What does the '.$_DB-FIELD-OF-IMAGE.' mean?

Link to comment
https://forums.phpfreaks.com/topic/165509-php-to-add-into-url/#findComment-873203
Share on other sites

it just means whatever field has the image info in ur DB

 

like:

 


$res=mysql_query("SELECT image_path FROM `table` WHERE `id`='1'");
$row=mysql_fetch_array($res);

$image=$row[0];

$url="/index.php?image=$image";

 

Ok, but what we are trying to use is sourced externally :l

 

What we basically want, is this!

 

User registers

Theres a field that says Name:

 

user puts Jon

 

So, now it generates a link http://www.phpfreaks.com/jon

 

Jon being automatically added in to the end of the URL, But we want it like this

http://www.habbo.co.uk/habbo-imaging/avatarimage?user=jon&action=wav&direction=3000003&head_direction=2999995&gesture=sml&size=s

 

Does that make any sense?

 

Link to comment
https://forums.phpfreaks.com/topic/165509-php-to-add-into-url/#findComment-873209
Share on other sites

where does the link go? does the link occur on the next page? or on that page?

 

if it is on the next page, u can just create the link after you insert them into the DB

 


$name=$_POST['name'];

mysql_query("INSERT INTO users ('name') VALUES (`$name`)");

//then ur link

$link="/index.php?name=$name&blah=blahetc";

 

else, if you are doing some sort of instant link without page submit, you can use javascript

 

Link to comment
https://forums.phpfreaks.com/topic/165509-php-to-add-into-url/#findComment-873213
Share on other sites

where does the link go? does the link occur on the next page? or on that page?

 

if it is on the next page, u can just create the link after you insert them into the DB

 


$name=$_POST['name'];

mysql_query("INSERT INTO users ('name') VALUES (`$name`)");

//then ur link

$link="/index.php?name=$name&blah=blahetc";

 

else, if you are doing some sort of instant link without page submit, you can use javascript

 

 

This is a vBULLETIN custom profile field!

 

I dont think I can accomplish here ;(

Link to comment
https://forums.phpfreaks.com/topic/165509-php-to-add-into-url/#findComment-873216
Share on other sites

I dont understand where the user is 'putting' this information!? it looks like you just have the users' username in there.. why not just get the damn thing from the DB. What is it you're trying to accomplish? Do you want like custom profile url's like FB? or just a direct link to the profile!?

 

I need a little more info than, the user can 'put' this in that.

 

 

Link to comment
https://forums.phpfreaks.com/topic/165509-php-to-add-into-url/#findComment-873224
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.