Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - zakaria666

Pages: [1] 2 3 4 5 ... 15
1
Mods & Plugins (Requests & Discussions) / PHP based FORUM (Request)
« on: November 28, 2010, 06:07:18 PM »
Hello Vano, rembrant and all the other amazing developers on here.

I just wanted to know whether there is a forum based MOD on here, Ive searched it and many people are integrating an already made PHP forum much like this forum here with 4images. I was wondering if a forum MOD could be made from scratch to integrate with 4images that I have now. I have the forum PHP scripts and and the tables that need to be made in SQL.

I have tried everything to try to integrate it but the code inside 4image is way to advanced and trying to undertake such a thing would be crazy as i would mess everytthing up. If it cannot be done can someone here please point me in the right direction.

Thank you

2
Great MOD

Just one question, I have installed another version of BBCODe. Its inside of functions.php, I have installed this mod http://www.4homepages.de/forum/index.php?topic=6692.0. Its a PMv2 MOD, this MOD has made me comment out much of the bbcode that was previously inside of functions.php.

Is there a possibility that this code inside of PMv2 on 6.2 of the instructions be tweaked so that I can have this awesome MOD. Because right now the instructions inside this MOD is telling me to find things and tweak things that I cannot do because I have commented out much of the previous bbcode to install the PMv2 MOD.

Thanks

3
Mods & Plugins (Releases & Support) / Re: [MOD] Shoutbox
« on: September 16, 2010, 11:18:45 PM »
@VANO   :mrgreen:

Sir, how are you. I was just wondering you helped me with a MOD http://www.4homepages.de/forum/index.php?topic=27868.0 which redirected the user to there most recent. However it doesnt seem to work on google chrome. However the principle that you helped me with that i am very utterly grateful for can the same principle be done for shoutbox?, I have placed the shoutbox on my home.html at the bottom. When user scrolls down makes a comment (page refreshes, as it should do) but the page is pushed up and user has to scroll down again. Can it be so user makes comment and page refreshes but gets pushed to the bottom rather than up.

Thanks u so much in advance.

4
 :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol:

You are the man vano,

I have good news and i have bad news.

1) Good news is the code you sent me below to put inside of js/ajaxcomments.js works amazinglyyyyyy but only for internet explorar browser and firefox browser lol, so thts the bad news it doesnt seem to work in all major browsers. I tried it in chrome but it gets pushed to the bottom but i have never understood browsers. Why does it work in IE and firefox but not google chrome??

Thanks alot man,

Code: [Select]
/*
comment_bit.html

cr{comment_id}          = <div> for rating number
crd{comment_id}         = <div> for votes number
cimglg{comment_id}      = <a href=""> for image "good"
cimglb{comment_id}      = <a href=""> for image "bad"
cimgg{comment_id}       = <img> for image "good"
cimgb{comment_id}       = <img> for image "bad"
cih{comment_id}         = <img> for image "very bad" (plus.png/minus.png)
cilh{comment_id}        = <a href=""> for image "very bad" (plus.png/minus.png)
commentbox{comment_id}  = <div> for single comment
cmsg{comment_id}        = title="" for an element where a tooltip message will be used.
*/


var Page;
var PerPage;
var RecaptchaBackup = {};
function ajaxCommentsResponse(param, text)
{
  var rsp = ajaxTagsFilter(text, ['error', 'msg', 'comment', 'page', 'perpage', 'paging', 'pagingstats', 'type', 'clear', 'eval']); //accepted tags
  rsp['error'] = parseInt(rsp['error']);
  rsp['type'] = parseInt(rsp['type']);
  rsp['page'] = parseInt(rsp['page']);
  rsp['perpage'] = parseInt(rsp['perpage']);
  rsp['clear'] = parseInt(rsp['clear']);
  if (rsp['page'] !== '')
    Page = rsp['page'];
  if (rsp['perpage'] !== '')
    PerPage = rsp['perpage'];
  var commentformmsg = ajaxGetObject('commentformmsg');
  var commentstable = ajaxGetObject('commentstable');

  var paging = ajaxGetObject('paging');
  var paging2 = ajaxGetObject('paging2');
  var pagingtable = ajaxGetObject('pagingtable');
  var pagingtable2 = ajaxGetObject('pagingtable2');
  var pagingstats = ajaxGetObject('pagingstats');

  if (rsp['clear'])
  {
    if (typeof param[4].comment_headline != "undefined")
      param[4].comment_headline.value = "";
    if (typeof param[4].comment_text != "undefined")
      param[4].comment_text.value = "";
  }
  if (rsp['clear'] || rsp['error'])
  {
    if (ajaxGetObject('captcha_image'))
    {
      new_captcha_image(false);
    }
    if (ajaxGetObject("captcha_input"))
    {
      ajaxGetObject("captcha_input").value = "";
    }
    if (typeof(Recaptcha) != "undefined")
    {
      if (typeof(RecaptchaBackup.focus_response_field) == "undefined")
        RecaptchaBackup.focus_response_field = Recaptcha.focus_response_field;

      Recaptcha.focus_response_field = function(){};
      Recaptcha.reload();
    }
  }
  if (commentformmsg && rsp['msg'])
  {
    commentformmsg.innerHTML = rsp['msg']+"<br /><br />";
  }
  if (rsp['paging'])
  {
    if (rsp['paging'] != "null")
    {
      if (paging)
      {
        paging.innerHTML = rsp['paging'];
      }
      if (pagingtable)
      {
        pagingtable.style.display = "inline";
      }
      if (paging2)
      {
        paging2.innerHTML = rsp['paging'];
      }
      if (pagingtable2)
      {
        pagingtable2.style.display = "inline";
      }
    }
  }
  else
  {
    if (pagingtable)
    {
      pagingtable.style.display = "none";
    }
    if (pagingtable2)
    {
      pagingtable2.style.display = "none";
    }
  }
  if (pagingstats && rsp['pagingstats'])
  {
    pagingstats.innerHTML = rsp['pagingstats'];
  }
  if (commentstable && rsp['comment'])
  {
    var t = commentstable.innerHTML;
    var i = t.lastIndexOf("<!--COMMENTEND-->");
    var e = t.substr(i);
    if (rsp['type'])
    {
      i = t.indexOf("<!--COMMENTSTART-->");
      var s = t.substr(0,i+19);
    }
    else
    {
      i = t.lastIndexOf("<!--COMMENTSTART-->");
      var s = t.substr(0,i+19);
    }
    commentstable.innerHTML = s + rsp['comment'] + e;
    ajaxCommentBG = (ajaxCommentBG++ > 1) ? 1 : 2;
  }
  if (rsp['eval'])
  {
    eval(rsp['eval']);
  }
}
function ajaxCommentSubmit(obj, Url)
{
  var Query = ajaxGetFormQuery(obj,['page', Page]);
  var Url = ajaxCommentsUrl + (ajaxCommentsUrl.indexOf("?") != -1 ? '&' : '?') + "js&commentbg=" + ajaxCommentBG + "&" + Url.substring(Url.search("\\?")+1);
  return !ajaxSend([ajaxCommentsResponse,Url,"POST",Query,obj]);
}
//comment vote related:
function aCTog(cid)
{
  var ct = ajaxGetObject("commentbox"+cid);
  var obj = ajaxGetObject("cih"+cid);
 
  if (obj.src.search("plus.png") != -1)
  {
    obj.src = obj.src.replace("/plus.png", "/minus.png");
      ct.style.display="block";
  }
  else
  {
    obj.src = obj.src.replace("/minus.png", "/plus.png");
      ct.style.display="none";
  }
  return false;
}
function ajaxCommentVoteResponse(param, text)
{
  var obj = param[4];
  var cid = param[5];
  var rsp = ajaxTagsFilter(text, ['error', 'rating', 'votes', 'status', 'msg', 'eval']); //accepted tags
  rsp['rating'] = parseInt(rsp['rating']);
  rsp['votes'] = parseInt(rsp['votes']);
  rsp['error'] = parseInt(rsp['error']);
  rsp['status'] = parseInt(rsp['status']);

  var cr                = ajaxGetObject('cr'+cid); //rating number
  var crd               = ajaxGetObject('crd'+cid); //votes number
  var cimglg            = ajaxGetObject('cimglg'+cid); //link to "good"
  var cimglb            = ajaxGetObject('cimglb'+cid); //link to "bad"
  var cimgg             = ajaxGetObject('cimgg'+cid); //image "good"
  var cimgb             = ajaxGetObject('cimgb'+cid); //image "bad"
  var cih               = ajaxGetObject('cih'+cid); //image for hidden (very bad) comment
  var cilh              = ajaxGetObject('cilh'+cid); //link image for hidden (very bad) comment
  var commentbox        = ajaxGetObject('commentbox'+cid); //the comment text box
  var cmsg              = ajaxGetObject('cmsg'+cid); //vote message for on mouse over tooltip'

  var commentratingmsg  = ajaxGetObject('commentratingmsg'); //vote message box
  if (!rsp['error'])
  {
    if (cr) //rating number
    {
      cr.innerHTML = (rsp['rating'] > 0 ? "+" : "")+rsp['rating'];
      cr.className = "comment_rating"+(rsp['rating'] > 0 ? 1 : (rsp['rating'] < 0 ? 2 : 0));
    }
    if (crd) //votes number
    {
      crd.innerHTML = rsp['votes'];
    }
  }
  else
  {
    //error vote
  }
  if (rsp['status'])
  {
    if (cimglg) //link to "good"
    {
      cimglg.removeAttribute("href");
      cimglg.removeAttribute("onclick");
      cimglg.onclick = function(){};
    }
    if (cimglb) //link to "bad"
    {
      cimglb.removeAttribute("href");
      cimglb.removeAttribute("onclick");
      cimglb.onclick = function(){};
    }
    if (cimgg) //image "good"
    {
      cimgg.src=cimgg.src.replace("good.png", "good_off.png");
    }
    if (cimgb) //image "bad"
    {
      cimgb.src=cimgb.src.replace("bad.png", "bad_off.png");
    }

    if (cih) //image for hidden (very bad) comment
    {

      if (rsp['rating'] <= ajaxCommentRatingHide) //hide message
      {
        if (cilh)
        {
          cilh.style.display="inline";
        }
        if (commentbox) //the comment text
        {
          if (cih.src.search("plus.png") != -1)
          {
            commentbox.style.display="none";
          }
        }
      }
      else
      {
        if (cilh)
        {
          cilh.style.display="none";
        }
        if (commentbox) //the comment text
        {
          if (commentbox.style.display == "none")
          {
            commentbox.style.display="block";
          }
        }
      }
    }
  }
  if (commentratingmsg && rsp['msg'])
  {
    commentratingmsg.innerHTML = rsp['msg'];
  }
  if (cmsg && rsp['msg'])
  {
    cmsg.title = rsp['msg'].replace(/(<br(\s+\/)?>|\r\n|\n)/ig, " ").replace(/<\/?[^>]+(>|$)/g, "");
  }
  if (rsp['eval'])
  {
    eval(rsp['eval']);
  }
}
function aCVote(obj,cid,r)
{
  var Url = ajaxCommentsUrl + (ajaxCommentsUrl.indexOf("?") != -1 ? '&' : '?') + 'js&action=ratingset&' + URL_ID + '=' + cid + '&mode=' + r;
 return !ajaxSend([ajaxCommentVoteResponse,Url,"GET",null,obj,cid,r]);
}




function CommentsPage(obj)
{
  var href = obj.getAttribute("href");
  var Query = href.substr(href.indexOf("?")+1);
  var Url = ajaxCommentsUrl + (ajaxCommentsUrl.indexOf("?") != -1 ? '&' : '?') + 'js&action=commentget&' + Query;
  return !ajaxSend([ajaxCommentsResponse, Url, "GET", null, obj]);
}

function CommentsPerPage(obj)
{
  var Query = ajaxGetFormQuery(obj);
//  var Query = ajaxGetFormQuery(obj,['page', Page]); // use this line if you want stay on the same page number
  var Url = ajaxCommentsUrl + (ajaxCommentsUrl.indexOf("?") != -1 ? '&' : '?') + 'js&action=commentget&' + (obj.getAttribute('action').indexOf("?") != -1 ? obj.getAttribute('action').substring(obj.getAttribute('action').search("\\?")+1) : '');
  return !ajaxSend([ajaxCommentsResponse, Url, "POST", Query, obj]);
}

5
I just viewed a topic where u had helped a member called benny http://www.4homepages.de/forum/index.php?topic=5830.msg150986#msg150986 and he asked u to help him make it so  that his comments are first so dont start from the bottom. I think this is where the confusion was. Ive kept on saying ASC and u was thinking i wasnt it at the bottom. So it was my fault.

Ive noticed that not even youtube has this functionality (which is a shock).

Excuse my aweful drawing presentation.

From the crap below drawing u can see i wrote inside of the top rectangle with words inside it, it is the new comment a user has posted. So just imagine that 100x in length. So the users will have to scroll down as u can see again and post a comment, then scroll all the way up and then down again and then up. So the code u have kindly given me just scrolls the page down fully and does not redirect the user back to the top of the new comment posted.




if this cannot be achieved just ignore this thread or just give me a smily face lol, i will just need to change a few things around inside of the comment seection.

take care man.

6
Has this mod been tested?

I installed it checked my add categories inside my admin control panel and there was duplicates. Gave me errors.

Thanks any way man

7
Mods & Plugins (Releases & Support) / Re: [MOD] User Categories Area
« on: September 11, 2010, 01:15:49 AM »
@Budduke,

No way man dont sweat it, it works now. Nice 1. Thanks for that sir. Thanks again for the swift fix

 :thumbup: :thumbup:

8
Mods & Plugins (Releases & Support) / Re: [MOD] User Categories Area
« on: September 10, 2010, 08:10:05 PM »
@Budduke

Hello sir,

I just want to clarify a few things with you.

1) Only members who now register to 4images after this mod has been installed are the only ones that will see the link to  'user category'. And those members who were regsitered before the MOD was installed wont see the link 'user categery'? I just want to make sure that this is the case as u know more than me because i have downloaded this http://www.4homepages.de/forum/index.php?topic=24628.msg150142#msg150142 zip u kindly made that was supposed to do something inside of the database. And give the users that were regsitered before the MOD was installed wil have access to user category. But after installing the zip and logging in as administrator or any other dummy test account i cannot seem to find the user caterogy link on the side.

Thank u Budduke and i would look forward to hearing from u

9
Mods & Plugins (Releases & Support) / Re: [Mod] Avatar v2.01
« on: September 10, 2010, 03:55:06 PM »
@Vano,

What i did is deleted my /upload.php  and replaced it with original upload.php and installed again very carefully the upload.php part modification. And i am still recieving problems regarding the fact it says parse error: syntax error, unexpected ';', expecting T_FUNCTION in /home/globa122/public_html/xxxxx/includes/upload.php on line 334

Code is below sir, When i add that part to the form tag <form> i seem to get that error above :( when 1 thing goes right 100 thing goes wrong for me i hate it

Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: upload.php                                           *
 *        Copyright: (C) 2002-2009 Jan Sorgalla                           *
 *            Email: jan@4homepages.de                                    * 
 *              Web: http://www.4homepages.de                             * 
 *    Scriptversion: 1.7.7                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/
if (!defined('ROOT_PATH')) {
  die(
"Security violation");
}

if (!
function_exists("is_uploaded_file")) {
  function 
is_uploaded_file($file_name) {
    if (!
$tmp_file = @get_cfg_var('upload_tmp_dir')) {
      
$tmp_file tempnam('','');
      
$deleted = @unlink($tmp_file);
      
$tmp_file dirname($tmp_file);
    }
    
$tmp_file .= '/'.get_basefile($file_name);
    return (
ereg_replace('/+''/'$tmp_file) == $file_name) ? 0;
  }

  function 
move_uploaded_file($file_name$destination) {
    return (
is_uploaded_file($file_name)) ? ((copy($file_name$destination)) ? 0) : 0;
  }
}

class 
Upload {

  var 
$upload_errors = array();
  var 
$accepted_mime_types = array();
  var 
$accepted_extensions = array();
  var 
$upload_mode 3;

  var 
$image_type "";
  var 
$max_width = array();
  var 
$max_height = array();
  var 
$max_size = array();
  var 
$upload_path = array();

  var 
$field_name;
  var 
$file_name;
  var 
$extension;

  var 
$image_size 0;
  var 
$image_size_ok 0;
  var 
$lang = array();

  function 
Upload() {
    global 
$config$lang;

    
$this->max_width['thumb'] = $config['max_thumb_width'];
    
$this->max_width['media'] = $config['max_image_width'];
    
$this->max_height['thumb'] = $config['max_thumb_height'];
    
$this->max_height['media'] = $config['max_image_height'];
  
$this->max_width['avatar'] = $config['avatar_width'];
  
$this->max_height['avatar'] = $config['avatar_height'];

    
$this->max_size['thumb'] = $config['max_thumb_size'] * 1024;
    
$this->max_size['media'] = $config['max_media_size'] * 1024;
    
$this->max_size['avatar'] = 99999999999;

    
$this->upload_mode $config['upload_mode'];
    
$this->lang $lang;

    
$this->set_allowed_filetypes();
  }

  function 
check_image_size() {
    
$this->image_size = @getimagesize($this->upload_file);
    
$ok 1;
    if (
$this->image_size[0] > $this->max_width[$this->image_type]) {
      
$ok 0;
      
$this->set_error($this->lang['invalid_image_width']);
    }

    if (
$this->image_size[1] > $this->max_height[$this->image_type]) {
      
$ok 0;
      
$this->set_error($this->lang['invalid_image_height']);
    }
    return 
$ok;
  }

  function 
copy_file() {
   if ($this->image_type == "avatar") {
    if (
file_exists($this->upload_path[$this->image_type]."/".$this->file_name)) {
        @
unlink($this->upload_path[$this->image_type]."/".$this->file_name);
      }
      
$ok move_uploaded_file($this->upload_file$this->upload_path[$this->image_type]."/".$this->file_name);
  }else{

    switch (
$this->upload_mode) {
    case 
1// overwrite mode
      
if (file_exists($this->upload_path[$this->image_type]."/".$this->file_name)) {
        @
unlink($this->upload_path[$this->image_type]."/".$this->file_name);
      }
      
$ok move_uploaded_file($this->upload_file$this->upload_path[$this->image_type]."/".$this->file_name);
      break;
    case 
2// create new with incremental extention
      
$n 2;
      
$copy "";
      while (
file_exists($this->upload_path[$this->image_type]."/".$this->name.$copy.".".$this->extension)) {
        
$copy "_".$n;
        
$n++;
      }
      
$this->file_name $this->name.$copy.".".$this->extension;
      
$ok move_uploaded_file($this->upload_file$this->upload_path[$this->image_type]."/".$this->file_name);
      break;
    case 
3// do nothing if exists, highest protection
    
default:
      if (
file_exists($this->upload_path[$this->image_type]."/".$this->file_name)) {
       
$this->set_error($this->lang['file_already_exists']);
       
$ok 0;
      }
      else {
        
$ok move_uploaded_file($this->upload_file$this->upload_path[$this->image_type]."/".$this->file_name);
      }
      break;
     }
    @
chmod($this->upload_path[$this->image_type]."/".$this->file_nameCHMOD_FILES);

    return 
$ok;
  }

  function 
check_max_filesize() {
    if (
$this->HTTP_POST_FILES[$this->field_name]['size'] > $this->max_size[$this->image_type]) {
      return 
false;
    }
    else {
      return 
true;
    }
  }

  function 
save_file() {
    global 
$user_info;

    
$this->upload_file $this->HTTP_POST_FILES[$this->field_name]['tmp_name'];
    
$ok 1;
    if (empty(
$this->upload_file) || $this->upload_file == "none") {
      
$this->set_error($this->lang['no_image_file']);
      
$ok 0;
    }

    if (
$user_info['user_level'] != ADMIN) {
      if (!
$this->check_max_filesize()) {
        
$this->set_error($this->lang['invalid_file_size']);
        
$ok 0;
      }
      if (
eregi("image"$this->HTTP_POST_FILES[$this->field_name]['type'])) {
        if (!
$this->check_image_size()) {
          
$ok 0;
        }
      }
    }

    if (!
$this->check_file_extension() || !$this->check_mime_type()) {
      
$this->set_error($this->lang['invalid_file_type']. " (".$this->extension.", ".$this->mime_type.")");
      
$ok 0;
    }
    if (
$ok) {
      if (!
$this->copy_file()) {
        if (isset(
$this->lang['file_copy_error'])) {
          
$this->set_error($this->lang['file_copy_error']);
        }
        
$ok 0;
      }
    }
    return 
$ok;
  }

  function 
upload_file($field_name$image_type$cat_id 0$file_name "") {
    global 
$HTTP_COOKIE_VARS$HTTP_POST_VARS$HTTP_GET_VARS$HTTP_POST_FILES;

    
// Bugfix for: http://www.securityfocus.com/archive/1/80106
    
if (isset($HTTP_COOKIE_VARS[$field_name]) || isset($HTTP_POST_VARS  [$field_name]) || isset($HTTP_GET_VARS   [$field_name])) {
      die(
"Security violation");
    }

    
$this->HTTP_POST_FILES $HTTP_POST_FILES;
    
$this->image_type $image_type;
    
$this->field_name $field_name;

    if (
$cat_id) {
      
$this->upload_path['thumb'] = THUMB_PATH."/".$cat_id;
      
$this->upload_path['media'] = MEDIA_PATH."/".$cat_id;
    
$this->upload_path['avatar'] = TEMPLATE_DIR."/".$cat_id."/avatars/users";
    }
    else {
      
$this->upload_path['thumb'] = THUMB_TEMP_PATH;
      
$this->upload_path['media'] = MEDIA_TEMP_PATH;
    }

    if (
$file_name != "" && $this->image_type != "avatar") {
      
ereg("(.+)\.(.+)"$file_name$regs);
      
$this->name $regs[1];
      
ereg("(.+)\.(.+)"$this->HTTP_POST_FILES[$this->field_name]['name'], $regs);
      
$this->extension $regs[2];
      
$this->file_name $this->name.".".$this->extension ;
    }
    else {
      
$this->file_name $this->HTTP_POST_FILES[$this->field_name]['name'];
      
$this->file_name ereg_replace(" ""_"$this->file_name);
      
$this->file_name ereg_replace("%20""_"$this->file_name);
      
$this->file_name preg_replace("/[^-\._a-zA-Z0-9]/"""$this->file_name);

      
ereg("(.+)\.(.+)"$this->file_name$regs);
      
$this->name $regs[1];
      
$this->extension $regs[2];
    }

 if (
$this->image_type == "avatar") {
    
$this->file_name $file_name.".".$this->extension;
  }

    
$this->mime_type $this->HTTP_POST_FILES[$this->field_name]['type'];
    
preg_match("/([a-z]+\/[a-z\-]+)/"$this->mime_type$this->mime_type);
    
$this->mime_type $this->mime_type[1];

    if (
$this->save_file()) {
      return 
$this->file_name;
    }
    else {
      return 
false;
    }
  }

  function 
check_file_extension($extension "") {
    if (
$extension == "") {
      
$extension $this->extension;
    }
    if (!
in_array(strtolower($extension), $this->accepted_extensions[$this->image_type])) {
      return 
false;
    }
    else {
      return 
true;
    }
  }

  function 
check_mime_type() {
    if (!isset(
$this->accepted_mime_types[$this->image_type])) {
      return 
true;
    }
    if (!
in_array($this->mime_type$this->accepted_mime_types[$this->image_type])) {
      return 
false;
    }
    else {
      return 
true;
    }
  }

  function 
set_allowed_filetypes() {
    global 
$config;
    
//Thumbnails
    
$this->accepted_mime_types['thumb'] = array(
      
"image/jpg",
      
"image/jpeg",
      
"image/pjpeg",
      
"image/gif",
      
"image/x-png"
    
);
    
$this->accepted_extensions['thumb'] = array(
      
"jpg",
      
"jpeg",
      
"gif",
      
"png"
    
);

 
//Avatar
    
$this->accepted_mime_types['avatar'] = array(
      
"image/jpeg",
      
"image/pjpeg",
      
"image/gif",
      
"image/x-png"
    
);
    
$this->accepted_extensions['avatar'] = array(
      
"jpg",
      
"jpeg",
      
"gif",
      
"png"
    
);


    
//Media
    
$this->accepted_extensions['media'] = $config['allowed_mediatypes_array'];

    
$mime_type_match = array();
    include(
ROOT_PATH.'includes/upload_definitions.php');

    foreach (
$mime_type_match as $key => $val) {
      if (
in_array($key$this->accepted_extensions['media'])) {
        if (
is_array($val)) {
          foreach (
$val as $key2 => $val2) {
            
$this->accepted_mime_types['media'][] = $val2;
          }
        }
        else {
          
$this->accepted_mime_types['media'][] = $val;
        }
      }
    }
  }

  function 
get_upload_errors() {
    if (empty(
$this->upload_errors[$this->file_name])) {
      return 
"";
    }
    
$error_msg "";
    foreach (
$this->upload_errors[$this->file_name] as $msg) {
      
$error_msg .= "<b>".(($this->image_type == "avatar") ? $this->HTTP_POST_FILES[$this->field_name]['name'] : $this->file_name).":</b> ".$msg."<br />";
    }
    return 
$error_msg;
  }

  function 
set_error($error_msg) {
    
$this->upload_errors[$this->file_name][] = $error_msg;
  }
//end of class
?>


10
Mods & Plugins (Releases & Support) / Re: [Mod] Avatar v2.01
« on: September 10, 2010, 02:47:46 PM »
@Vano,

thanks for reply

This is the problem i think some members had some time ago i was browsing throgh and came across this thread u made
http://www.4homepages.de/forum/index.php?topic=3978.msg16549#msg16549

I changed it to this but then i get an error saying unexpected ';', inside of the upload form. When i removed it and then everything was normal but it still didnt upload. I upload an avatar click save page refreshes but no image.

:(

thanks sir

11
Mods & Plugins (Releases & Support) / Re: [Mod] Avatar v2.01
« on: September 09, 2010, 11:34:50 PM »
Hello vano,


Also for some reason users cannot seem to upload there own avatrs or pictures? it doesnt seem to work, ive set it 100 x 100  and i open image thats 100 x100 click save and it doesnt work

thanks

12
Hello Vano,

I sent you a message but my internet connection kept on saying error pm, so i dont know if you have recieved the PM i sent you on your other account. I was just asking you to send me your IP address so that i can include your ip into the htaccess, so that you can gain access and look at the problem that im having. Thank you VANO

Also vano, when you view the site, can you tell me how i can change the width and size of the bbcode inside of the pm, i have managed to change it via your advice but what i mean is the smily faces are now very pixilated.

God bless u man

13
Mods & Plugins (Releases & Support) / Re: [MOD] Photo Preview Hack
« on: September 09, 2010, 07:53:45 PM »
@Rembrandt

Very amazing 1. Thanks man. It is exactly the way i wanted it. Looks very cool and now it looks very neat. thank you 100x  :thumbup:


thanks man

14
Hello vano,

Yes sir i have checked all major browsers. I had this problem in the past also but ive never known what and why these occurs.  :? :(


15
Mods & Plugins (Releases & Support) / Re: [MOD] Photo Preview Hack
« on: September 09, 2010, 02:59:12 AM »
 :( :( :( :(

@ Rembrandt not remembrant

Please forgive me. I sincerely apologize. Upon you telling me that remembrant was not a member here i thought that you meant I was being disrespectful to you by talking to you as a member and not as a respected administrator/moderator. It was only after i realized what you had meant by this comment. I sincerely apologize and please forgive me. It will not happen again. I hope you are not angry or upset with me  :(.

@Vano

I very much also sincerely apologize. I did not mean to be disrespectful what so ever.  :( I actually do have a mild form of dyslexia which i havent told anyone about. For some reason when im nervous or under pressure like standing up infront of the class and talking. The words just dont make sense and in very small occasions like when i said remembrant :cry:

I am really sorry guys. Please if I have annoyed you or any of your fellow workers i will discontinue use of this forum, you just have to say the word. I dont want to make anyone here angry. You guys have been there with support whenever ive needed it and if i have upset anyone please do say .

Im very soory again rembrandt and voano lol i mean vano  (whis) :)

Pages: [1] 2 3 4 5 ... 15
Post your comments here