Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 10 Years, 9 Months, 3 Weeks ago PHP expert please help
#11
Solved: 10 Years, 9 Months, 3 Weeks ago
Mayday, Mayday, Mayday!
Come one anybody help me to nail this one. I know a magic word "please"
#12
Solved: 10 Years, 9 Months, 3 Weeks ago
This user has been denied support. This user has been denied support.
if(preg_match('#https?\://(?:www\.)?facebook\.com/(\d+|[A-Za-z0-9\.]+)/?#', $userfields['fid6']))
{
/* Facebook URL matched. */
}
else
{
/* Ah, some wrong input, notify user & ask him to die. */
}
#13
Solved: 10 Years, 9 Months, 3 Weeks ago
Thanks baddy very much listen is this the correct hook?
$plugins->add_hook("usercp_profile_start", "cpfbbcode");

I am using this code but it doesn't allow me to open edit page how to make it run during update when user clicks on safe?

function cpfbbcode()
{
    global $mybb, $userfields;
if(preg_match('#https?\://(?:www\.)?facebook\.com/(\d+|[A-Za-z0-9\.]+)/?#', $userfields['fid6']))
{
	error("Facebook URL");
}
else
{
error("Not Facebook URL");
}
}
#14
Solved: 10 Years, 9 Months, 3 Weeks ago
This user has been denied support. This user has been denied support.
You need to specify some hidden input in your "Save it" form.

For example:

<input type="hidden" name="do_save_facebook" value="1" />

Then check it as:

<?php

if(isset($mybb->input['do_save_facebook']))
{
/* Update database, or do save something, lol */
}

?>
#15
Solved: 10 Years, 9 Months, 3 Weeks ago
Guys please could you tell me step by step how to do it it just too complex for me! I though it was a matter of simple plugin but it turned out to be super complicated!
#16
Solved: 10 Years, 9 Months, 3 Weeks ago
This user has been denied support. This user has been denied support.
Well, okay.

So basically say I visit your plugin page in UserCP.
Say its URL is: usercp.php?action=MyPlugin

Then you gotta check if USER visited your page by:

if($mybb->input['action'] == "MyPlugin")
{
   /* Now let us check if we have a submit request */
   if($mybb->input['name'] == "submit" && $mybb->request_method=="post")
   {
      /* Update table in database, or etc. */
   }
   /* eval your plugin's Template */
}

Can you get it?
#17
Solved: 10 Years, 9 Months, 3 Weeks ago
@Cedric baby thanks very much for your help. I used my superior intelligence to nail this mother lol Smile
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)