1 (edited by papi83dm 2012-06-29 02:02)

Topic: [Extension] Profile Additional Fields

Profile Additional Fields
v1.0

Extension to simply manage AdSense in forum

Features:
1) Add additional fields to the profile page.
2) Field won't display on profile page if it does not have any data.
3) Add unlimited number of fields.
4) English language

The tests only in my 1.4.2



screenshots:

http://maddendaddy.com/field1.jpg

Re: [Extension] Profile Additional Fields

http://maddendaddy.com/field2.jpg

Re: [Extension] Profile Additional Fields

third screenshot

http://maddendaddy.com/field3.jpg

4

Re: [Extension] Profile Additional Fields

This release screenshots? smile

Re: [Extension] Profile Additional Fields

This is my first mod for this forum, Where can I put the code?

Re: [Extension] Profile Additional Fields

For example GitHub

Re: [Extension] Profile Additional Fields

I found a place to put the download field, here it is,

Download

8 (edited by kantribiotis 2012-08-26 02:13)

Re: [Extension] Profile Additional Fields

just installed this extension, and my forum crashed.

what happened???

EDIT: i strongly recommend DO NOT DOWNLOD this extension

9

Re: [Extension] Profile Additional Fields

kantribiotis: to disable extension open config and uncomment line:

//define('FORUM_DISABLE_HOOKS', 1);

then go to admin page and uninstall any extension

Re: [Extension] Profile Additional Fields

cant even uninstall this extension, even after disabling the hooks, for now disabled the extension, any idea how to remove it or even better fix it.

MyFootballCafe.com  is Now Online!

11

Re: [Extension] Profile Additional Fields

May be json_decode function not supported  in your php installation?
Try add the following code into function.php to end file:


  if (!function_exists('json_decode')) {
    function json_decode($json) {
      $comment = false;
      $out     = '$x=';
      for ($i=0; $i<strlen($json); $i++) {
        if (!$comment) {
          if (($json[$i] == '{') || ($json[$i] == '[')) {
            $out .= 'array(';
          }
          elseif (($json[$i] == '}') || ($json[$i] == ']')) {
            $out .= ')';
          }
          elseif ($json[$i] == ':') {
            $out .= '=>';
          }
          elseif ($json[$i] == ',') {
            $out .= ',';
          }
          elseif ($json[$i] == '"') {
            $out .= '"';
          }
          /*elseif (!preg_match('/\s/', $json[$i])) {
            return null;
          }*/
        }
        else $out .= $json[$i] == '$' ? '\$' : $json[$i];
        if ($json[$i] == '"' && $json[($i-1)] != '\\') $comment = !$comment;
      }
      eval($out. ';');
      return $x;
    }
  }

        if (!function_exists('json_encode'))
        {
            function json_encode($data)
            {
                switch ($type = gettype($data))
                {
                    case 'NULL':
                        return 'null';
                    case 'boolean':
                        return ($data ? 'true' : 'false');
                    case 'integer':
                    case 'double':
                    case 'float':
                        return $data;
                    case 'string':
                        return '"' . addslashes($data) . '"';
                    case 'object':
                        $data = get_object_vars($data);
                    case 'array':
                        $output_index_count = 0;
                        $output_indexed = array();
                        $output_associative = array();
                        foreach ($data as $key => $value)
                        {
                            $output_indexed[] = json_encode($value);
                            $output_associative[] = json_encode($key) . ':' . json_encode($value);
                            if ($output_index_count !== NULL && $output_index_count++ !== $key)
                            {
                                $output_index_count = NULL;
                            }
                        }
                        if ($output_index_count !== NULL) {
                            return '[' . implode(',', $output_indexed) . ']';
                        } else {
                            return '{' . implode(',', $output_associative) . '}';
                        }
                    default:
                        return ''; // Not supported
                }
            }
        }    

Re: [Extension] Profile Additional Fields

still cant uninstall it.

MyFootballCafe.com  is Now Online!

13

Re: [Extension] Profile Additional Fields

see php error log

Re: [Extension] Profile Additional Fields

I apologized that your forum crashed, I only tested it on a 1.4.2 version. Is your forum still crashed?

Re: [Extension] Profile Additional Fields

if you are talking to me,

then no, i disibled the extensions, but i still cant uninstall it. i am also using 1.4.2.

i would really appreciate it if you find a way to fix this, i really like to have this extension working.

MyFootballCafe.com  is Now Online!

Re: [Extension] Profile Additional Fields

has this extension has been fixed yet?

MyFootballCafe.com  is Now Online!