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 - batu544

Pages: 1 2 [3] 4 5 6 7 ... 23
31
Hi Mawenzi... Thank you... :)

      I have not used e-referrer, but I think yes, its like e-referrer, one difference is, it will only list the referrer website only if its present in your friends list.

Thank you
batu544

32
Hi,
     Happy new year to all... I have been designed a mod for my website. Top friends. You can see the demo on my website. The order of the links is based on the incoming traffic . By using this you can increase your galleries traffic :)


   Please let me know, if anyone is interested in this mod..  I will put the required changes in words...


Thank you.
batu544

33
Chit Chat / Google listing with 4image script
« on: December 24, 2010, 10:48:49 AM »
Hi All -
               Its Christmas time.. So.. happy Christmas to all.. :)  One more good news.. I have been using 4image for my website for a long time and now for couple of keywords my website is on the first page of major search engines..For couple of words its on the first place also.. I don't believe it...  :lol:


Thanks to all the members who helped me in doing all small or big changes..  also thanks to me for my patient and couple of in-house modification :wink:




Thanks to All,
Batu


 


34
Discussion & Troubleshooting / Re: moving data folder to a sub-domain ??
« on: December 20, 2010, 09:45:34 AM »
Thank x23piracy.. !! but, if we will follow your method.. then each time we add a new picture,then we need to update the DB manually..

V@no.. Do you have any suggestions on this ??

 
Thank you
batu544

35
Discussion & Troubleshooting / moving data folder to a sub-domain ??
« on: December 19, 2010, 09:18:29 PM »
Hi All -
          After a long time.. I came up with one more question.. :)

 I would like to move my data folder to a subdomain ( cookie less domain ).

For example now 4image is generating all relative paths to my images.. like   ./data/thumbnails/91/xyz.jpg   

Is it possible to change this image path to something like http://media.domainname.com/thumbnails/91/xyz.jpg ?



Any help or suggestion will be very helpful .. 

Thank you
batu544

36
Chit Chat / Re: Spam im Forum
« on: December 14, 2010, 04:53:23 PM »
Wow..!! Today.. when I tried to visit the forum.. I got a warning page.. "I am a bot." :)   then I filled some simple questions.. and able to access forum..

I think .. its implemented recently.. anyway.. its a good option to stop spammers..


37
Programming / Re: How to except from index?
« on: December 02, 2010, 05:43:06 PM »
Hi,
    I didn't get your question exactly.. can you explain it little bit more ??


38
Programming / Re: How to delete path of the link??
« on: September 20, 2010, 02:19:29 PM »
View your detail page source .. you can get the link of your images..

39
Discussion & Troubleshooting / Re: Using 4images on 2 servers
« on: September 18, 2010, 01:31:37 PM »
yes .. its possible . You need to use the url of the other server image to add one new image..

40
Discussion & Troubleshooting / Re: Likely Fresh attack.. !!!
« on: September 17, 2010, 09:56:53 PM »
yep.. its not related to 4image related.. and in my server also I don;t have any folder called plugins..  just posted it here to know .. if any other member has seen this type of entry in their error log..

41
Discussion & Troubleshooting / Likely Fresh attack.. !!!
« on: September 17, 2010, 09:28:53 PM »
Hi,
     Today I was browsing my website error log and surprised to see couple of below errors..

Code: [Select]
Fri Sep 17 12:15:45 2010] [error] [client 92.243.84.187] File does not exist: /home/xxxxxx/public_html/plugins, referer: http://www.bhwallpapers.com/plugins/editors/tinymce/jscripts/tiny_mce/plugins/tinybrowser/tinybrowser.php?type=file&folder=
Code: [Select]
[Fri Sep 17 10:51:43 2010] [error] [client 92.243.84.187] File does not exist: /home/xxxxxx/public_html/plugins, referer: http://www.bhwallpapers.com/plugins/editors/tinymce/jscripts/tiny_mce/plugins/tinybrowser/tinybrowser.php?type=file&folder=

Is it some hacking attempt ??

Thanks,

42
Mods & Plugins (Requests & Discussions) / Re: Badword List is not working..
« on: September 16, 2010, 05:37:42 PM »
V@no... your suggestion worked.. !!! :)   now its working fine. (yes, I have disabled the BBcodes in comment) Thanks again for your help..

43
Mods & Plugins (Requests & Discussions) / Re: Badword List is not working..
« on: September 16, 2010, 05:58:01 AM »
Just now I tested the bad word filters in my own system and its working fine.. but in server its not working..

This is my show comment code in details.php
Code: [Select]
//-----------------------------------------------------
//--- Show Comments -----------------------------------
//-----------------------------------------------------
if ($image_allow_comments == 1) {
  $site_template->register_vars(array(
      "has_rss"   => true,
      "rss_title" => "RSS Feed: ".$image_name." (".str_replace(':', '', $lang['comments']).")",
      "rss_url"   => $script_url."/rss.php?action=comments&".URL_IMAGE_ID."=".$image_id
  ));

  $sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq")."
          FROM ".COMMENTS_TABLE." c
          LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = c.user_id)
          WHERE c.image_id = $image_id
          ORDER BY c.comment_date ASC";
  $result = $site_db->query($sql);

  $comment_row = array();
  while ($row = $site_db->fetch_array($result)) {
    $comment_row[] = $row;
  }
  $site_db->free_result($result);
  $num_comments = sizeof($comment_row);

  if (!$num_comments) {
    $comments = "<tr><td class=\"commentrow1\" colspan=\"2\">".$lang['no_comments']."</td></tr>";
  }
  else {
    $comments = "";
    $bgcounter = 0;
    for ($i = 0; $i < $num_comments; $i++) {
      $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;

      $comment_user_email = "";
      $comment_user_email_save = "";
      $comment_user_mailform_link = "";
      $comment_user_email_button = "";
      $comment_user_homepage_button = "";
      $comment_user_icq_button = "";
      $comment_user_profile_button = "";
      $comment_user_status_img = REPLACE_EMPTY;
      $comment_user_name = format_text($comment_row[$i]['comment_user_name'], 2);
      $comment_user_info = $lang['userlevel_guest'];

      $comment_user_id = $comment_row[$i]['user_id'];

      if (isset($comment_row[$i][$user_table_fields['user_name']]) && $comment_user_id != GUEST) {
        $comment_user_name = format_text($comment_row[$i][$user_table_fields['user_name']], 2);

        $comment_user_profile_link = !empty($url_show_profile) ? $site_sess->url(preg_replace("/{user_id}/", $comment_user_id, $url_show_profile)) : $site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$comment_user_id);
        $comment_user_profile_button = "<a href=\"".$comment_user_profile_link."\"><img src=\"".get_gallery_image("profile.gif")."\" border=\"0\" alt=\"".$comment_user_name."\" /></a>";

        $comment_user_status_img = ($comment_row[$i][$user_table_fields['user_lastaction']] >= (time() - 300) && ((isset($comment_row[$i][$user_table_fields['user_invisible']]) && $comment_row[$i][$user_table_fields['user_invisible']] == 0) || $user_info['user_level'] == ADMIN)) ? "<img src=\"".get_gallery_image("user_online.gif")."\" border=\"0\" alt=\"Online\" />" : "<img src=\"".get_gallery_image("user_offline.gif")."\" border=\"0\" alt=\"Offline\" />";

        $comment_user_homepage = (isset($comment_row[$i][$user_table_fields['user_homepage']])) ? format_url($comment_row[$i][$user_table_fields['user_homepage']]) : "";
        if (!empty($comment_user_homepage)) {
          $comment_user_homepage_button = "<a href=\"".$comment_user_homepage."\" target=\"_blank\"><img src=\"".get_gallery_image("homepage.gif")."\" border=\"0\" alt=\"".$comment_user_homepage."\" /></a>";
        }

        $comment_user_icq = (isset($comment_row[$i][$user_table_fields['user_icq']])) ? format_text($comment_row[$i][$user_table_fields['user_icq']]) : "";
        if (!empty($comment_user_icq)) {
          $comment_user_icq_button = "<a href=\"http://www.icq.com/people/about_me.php?uin=".$comment_user_icq."\" target=\"_blank\"><img src=\"http://web.icq.com/whitepages/online?icq=".$comment_user_icq."&img=5\" width=\"18\" height=\"18\" border=\"0\" alt=\"".$comment_user_icq."\" /></a>";
        }

        if (!empty($comment_row[$i][$user_table_fields['user_email']]) && (!isset($comment_row[$i][$user_table_fields['user_showemail']]) || (isset($comment_row[$i][$user_table_fields['user_showemail']]) && $comment_row[$i][$user_table_fields['user_showemail']] == 1))) {
          $comment_user_email = format_text($comment_row[$i][$user_table_fields['user_email']]);
          $comment_user_email_save = format_text(str_replace("@", " at ", $comment_row[$i][$user_table_fields['user_email']]));
          if (!empty($url_mailform)) {
            $comment_user_mailform_link = $site_sess->url(preg_replace("/{user_id}/", $comment_user_id, $url_mailform));
          }
          else {
            $comment_user_mailform_link = $site_sess->url(ROOT_PATH."member.php?action=mailform&amp;".URL_USER_ID."=".$comment_user_id);
          }
          $comment_user_email_button = "<a href=\"".$comment_user_mailform_link."\"><img src=\"".get_gallery_image("email.gif")."\" border=\"0\" alt=\"".$comment_user_email_save."\" /></a>";
        }

        if (!isset($comment_row[$i][$user_table_fields['user_level']]) || (isset($comment_row[$i][$user_table_fields['user_level']]) && $comment_row[$i][$user_table_fields['user_level']] == USER)) {
          $comment_user_info = $lang['userlevel_user'];
        }
        elseif ($comment_row[$i][$user_table_fields['user_level']] == ADMIN) {
          $comment_user_info = $lang['userlevel_admin'];
        }

        $comment_user_info .= "<br />";
        $comment_user_info .= (isset($comment_row[$i][$user_table_fields['user_joindate']])) ? "<br />".$lang['join_date']." ".format_date($config['date_format'], $comment_row[$i][$user_table_fields['user_joindate']]) : "";
        $comment_user_info .= (isset($comment_row[$i][$user_table_fields['user_comments']])) ? "<br />".$lang['comments']." ".$comment_row[$i][$user_table_fields['user_comments']] : "";
      }

      $comment_user_ip = ($user_info['user_level'] == ADMIN) ? $comment_row[$i]['comment_ip'] : "";

      $admin_links = "";
      if ($user_info['user_level'] == ADMIN) {
        $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("comments.php?action=editcomment&amp;comment_id=".$comment_row[$i]['comment_id']))."\" target=\"_blank\">".$lang['edit']."</a>&nbsp;";
        $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("comments.php?action=removecomment&amp;comment_id=".$comment_row[$i]['comment_id']))."\" target=\"_blank\">".$lang['delete']."</a>";
      }
      elseif ($is_image_owner) {
        $admin_links .= ($config['user_edit_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=editcomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['edit']."</a>&nbsp;";
        $admin_links .= ($config['user_delete_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=removecomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['delete']."</a>";
      }

      $site_template->register_vars(array(
        "comment_id" => $comment_row[$i]['comment_id'],
        "comment_user_id" => $comment_user_id,
        "comment_user_status_img" => $comment_user_status_img,
        "comment_user_name" => $comment_user_name,
        "comment_user_info" => $comment_user_info,
        "comment_user_profile_button" => $comment_user_profile_button,
        "comment_user_email" => $comment_user_email,
        "comment_user_email_save" => $comment_user_email_save,
        "comment_user_mailform_link" => $comment_user_mailform_link,
        "comment_user_email_button" => $comment_user_email_button,
        "comment_user_homepage_button" => $comment_user_homepage_button,
        "comment_user_icq_button" => $comment_user_icq_button,
        "comment_user_ip" => $comment_user_ip,
        "comment_headline" => format_text($comment_row[$i]['comment_headline'], 0, $config['wordwrap_comments'], 0, 0),
        "comment_text" => format_text($comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']),
        "comment_date" => format_date($config['date_format']." ".$config['time_format'], $comment_row[$i]['comment_date']),
        "row_bg_number" => $row_bg_number,
        "admin_links" => $admin_links
      ));
      $comments .= $site_template->parse_template("comment_bit");
    } // end while
  } //end else
  $site_template->register_vars("comments", $comments);
  unset($comments);


and this is the format_text function..
Code: [Select]
function replace_badwords($text) {
  global $config, $split_badwords;
  if ($config['badword_list'] != "") {
    if (!isset($split_badwords)) {
      $badwords = trim($config['badword_list']);
      $badwords = preg_replace("/[\n\r]/is", " ", $badwords);
      $badwords = str_replace(","," ",$badwords);
      $badwords = preg_quote($badwords);
      $badwords = str_replace('/', '\\/', $badwords);
      $split_badwords = preg_split("/\s+/", $badwords);
    }

    foreach ($split_badwords as $key => $val) {
      if ($val != "") {
        if (substr($val, 0, 2) == "\\{") {
          $val = substr($val, 2, -2);
          $text = trim(preg_replace("/([^A-Za-z])".$val."(?=[^A-Za-z])/si", "\\1".str_repeat($config['badword_replace_char'], strlen($val)), " $text "));
        }
        else {
          $text = trim(preg_replace("/$val/si", str_repeat($config['badword_replace_char'], strlen($val)), " $text "));
        }
      }
    }
  }
  return $text;
}

function format_text($text, $html = 0, $word_wrap = 0, $bbcode = 0, $bbcode_img = 0) {
  if ($word_wrap && $text != "") {
    $text = preg_replace("/([^\n\r ?&\.\/<>\"\\-]{".$word_wrap."})/i", " \\1\n", $text);
  }

  if ($html == 0 || $html == 2) {
    $text = safe_htmlspecialchars($text);
  }

  if ($html !== 2) {
    $text = nl2br(trim($text));
    $text = replace_url($text);
  }

  if ($bbcode == 1) {
    $search_array = array(
      "/(\[)(list)(=)(['\"]?)([^\"']*)(\\4])(.*)(\[\/list)(((=)(\\4)([^\"']*)(\\4]))|(\]))/siU",
      "/(\[)(list)(])(.*)(\[\/list\])/siU",
      "/(\[\*\])/siU",
      "/(\[\/\*\])/siU",
      "/(\[)(url)(=)(['\"]?)(www\.)([^\"']*)(\\4])(.*)(\[\/url\])/siU",
      "/(\[)(url)(=)(['\"]?)([^\"']*)(\\4])(.*)(\[\/url\])/siU",
      "/(\[)(url)(])(www\.)([^\"]*)(\[\/url\])/siU",
      "/(\[)(url)(])([^\"]*)(\[\/url\])/siU",
      "/(\[)(code)(])(\r\n)*(.*)(\[\/code\])/siU",
      "/javascript:/si",
      "/about:/si"
    );
    $replace_array = array(
      "<ol type=\"\\5\">\\7</ol>",
      "<ul>\\4</ul>",
      "<li>",
      "</li>",
      "<a href=\"http://www.\\6\" target=\"_blank\" rel=\"nofollow\">\\8</a>",
      "<a href=\"\\5\" target=\"_blank\" rel=\"nofollow\">\\7</a>",
      "<a href=\"http://www.\\5\" target=\"_blank\" rel=\"nofollow\">www.\\5</a>",
      "<a href=\"\\4\" target=\"_blank\" rel=\"nofollow\">\\4</a>",
      "<pre>Code:<hr size=1>\\5<hr size=1></pre>",
      "java script:",
      "about :"
    );
    $text = preg_replace($search_array, $replace_array, $text);
    if (!$bbcode_img)  {
      $text = preg_replace("/(\[)(img)(])(\r\n)*([^\"]*)(\[\/img\])/siU", "<a href=\"\\5\" target=\"_blank\">\\5</a>", $text);
    }
    else  {
      $text = preg_replace("/(\[)(img)(])(\r\n)*([^\"]*)(\[\/img\])/siU", "<img src=\"\\5\">", $text);
    }
    $text = preg_replace("/(\[)(b)(])(\r\n)*([^\"]*)(\[\/b\])/siU", "<b>\\5</b>", $text);
    $text = preg_replace("/(\[)(i)(])(\r\n)*([^\"]*)(\[\/i\])/siU", "<i>\\5</i>", $text);
    $text = preg_replace("/(\[)(u)(])(\r\n)*([^\"]*)(\[\/u\])/siU", "<u>\\5</u>", $text);

    $text = replace_badwords($text);
  }

  $text = str_replace("\\'", "'", $text);

  return $text;
}



Do you see any issues here ??

Thank you.

44
Mods & Plugins (Requests & Discussions) / Re: Badword List is not working..
« on: September 15, 2010, 08:12:57 PM »
Thanks V@no for your reply.. I am using 1.7.4 and as far as I remember I have not modified the comment.php file ..

Will it help me.. if I will replace the comments.php file from v 1.7.8 ?

and how this bad word filter works ? Is the bad word has been stored in the database as **** or only during the display time it changes to **** ?


Thank you
batu544

45
Mods & Plugins (Requests & Discussions) / Badword List is not working..
« on: September 15, 2010, 08:16:20 AM »
Hi,
    I have added some words in badword list .. but those words are still displaying on comments..  Is there anything needs to be done.. ?

Thanks,
batu544

Pages: 1 2 [3] 4 5 6 7 ... 23