Jump to content

This is my Real problem..


Gayner

Recommended Posts

Thorne gave me a wonderful script and it works fine but I want to beable to put it inside this function:

 

function BSettings($member){
global $ibforums;
return  <<<EOF


RIGHT IN HERE... 

EOF;
}

THIS ^^^ IS MY Skin_UCP.php

But only 1 Problem, lol

See the function BSettings Resembles:

 

2hgfvcn.jpg

 

I took out some html so it's not as crowded.

 

 

 

This is the script thorne gave me it's epic.

$options = array('24-7GT Default', 'Light Blue', 'Sunset', 'Beautiful Blue', 'Tan', 'Crazy Gray', 'Toxin');
$this->output .= "<select name='monkskin'>";
for ($i=0;$i<=6;$i++) {
  if ($member['monkskin'] == $i) {
  
    $this->output .= "<option value='$i' selected='selected'>{$options[$i]}</option>";
  } else {
    $this->output .= "<option value='$i'>{$options[$i]}</option>";
  }
}
$this->output .= "</select>";

 

But it will not work inside that function because It only allows HTML.

 

How the hell do I get it in there..

 

 

function BSettings(){
global $ibforums, $DB, $std, $print;
// Lets get your data
$DB->query("SELECT
mp3access, mp3auto, trans, auto, mp3, desktopi, bcolor, bposition, rep, trans,sigtrans,mstyle,monkskin FROM ibf_members
                   WHERE id='".$this->member['id']."'");
	$member = $DB->fetch_row();



$this->output .= $this->html->BSettings($member,$mp3);
$this->page_title = $ibforums->lang['t_welcome'];
$this->nav        = array( "<a href='index.php'>24-7GT Forums</a> -> ",
"<a href='index.php?act=UserCP&CODE=01'>Settings</a> -> Background Settings / MP3",
);
}

That is my USERCP.php page.

Link to comment
https://forums.phpfreaks.com/topic/172364-this-is-my-real-problem/
Share on other sites

Why you needed to open a new thread is beyond me. You should have just asked this question in the first place. I'm sure you'll get the hang of it eventually.

 

function BSettings($member){
  global $ibforums;
  $out = '';
  $options = array('24-7GT Default', 'Light Blue', 'Sunset', 'Beautiful Blue', 'Tan', 'Crazy Gray', 'Toxin');
  $out = "<select name='monkskin'>";
  for ($i=0;$i<=6;$i++) {
    if ($member['monkskin'] == $i) {
      $out .= "<option value='$i' selected='selected'>{$options[$i]}</option>";
    } else {
      $out .= "<option value='$i'>{$options[$i]}</option>";
    }
  }
  $out .= "</select>";
  return $out;
}

Why you needed to open a new thread is beyond me. You should have just asked this question in the first place. I'm sure you'll get the hang of it eventually.

 

function BSettings($member){
  global $ibforums;
  $out = '';
  $options = array('24-7GT Default', 'Light Blue', 'Sunset', 'Beautiful Blue', 'Tan', 'Crazy Gray', 'Toxin');
  $out = "<select name='monkskin'>";
  for ($i=0;$i<=6;$i++) {
    if ($member['monkskin'] == $i) {
      $out .= "<option value='$i' selected='selected'>{$options[$i]}</option>";
    } else {
      $out .= "<option value='$i'>{$options[$i]}</option>";
    }
  }
  $out .= "</select>";
  return $out;
}

TY TY!!

 

But.

$out = '';
  $options = array('24-7GT Default', 'Light Blue', 'Sunset', 'Beautiful Blue', 'Tan', 'Crazy Gray', 'Toxin');
  $out = "<select name='monkskin'>";
  for ($i=0;$i<=6;$i++) {
    if ($member['monkskin'] == $i) {
      $out .= "<option value='$i' selected='selected'>{$options[$i]}</option>";
    } else {
      $out .= "<option value='$i'>{$options[$i]}</option>";
    }
  }
  $out .= "</select>";
  return $out;  <<<EOF

 

Then i lose all my html.. so now my page look like this: LOL

 

25so01z.jpg

 

Man this is awesome tho... thx a bunch.

 

Anyway I could pertain my html still and show it? lol

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.