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.

Topics - yousaf

Pages: [1]
Im under a SPAM attack n i have to Delete more than 50 spam comments a day or a session whenever i comes online to my Site. i tried the Recaptcha mood but no success( remember its an attack after enabling recaptcha, before recaptcha it was more than hundred a day)

so i thought i should try a different comments platform n someone suggested me DISQUS, its easy to impliment but it needs a few things while setting it up on the site.

first is link structure & 2nd is exporting the Existing comments to an XML file.

lets talk abt the first one, Disqus is asking for a permalink structure, where the comments box n comments will appear

    // var disqus_identifier = 'unique_dynamic_id_1234';    <<<<<<<<<<<< ----- Image Name
    // var disqus_url = ''; <<<<<< ----- Image Path

since im a complete noob to coding, i need help in this matter please tell me what structure i should post

note: i am already using a Permalink Mood on my 4images site. [ [MOD] Google Friendly Urls For 4images Best Seo Mod ]


We recommend NOT to use PHPTHumb until they released a fixed version!

The current version 1.7.9-200805132119 (released May 28, 2008) has a big security leak.
Attackers can compromise your server.

Secunia rated this vulnerability as "highly critical".

EDIT: 4images Team

This a Tutorial about how to use PhpThumb on your 4images gallery,
so that you can show up image size of your choice on details.php
Note: { if you are running your 4images gallery on a Shared hosting and you are getting high traffic then just forget it.
because resizing is using a lot of memory if you are planning to have a lot a visitors and lot of pictures..

instead you maybe try this mod
[MOD] Resize wallpaper for restrain resize template.}

There are lots of post about PhpThumb but none of them have clear instructions
and most the guys are getting this error message
Code: [Select]
phpthumb() v1.7.9-200805132119
"/home/xxx/public_html/xxx/phpthumb/./data/media/26/chapel beach.jpg" does not exist.
because they upload phpthumb files to wrong path
so i think i should post these steps which i followed with the help of Nicky(Thanks Nicky)

1.) Download phpthumb from this link. PhpTumb
then unzip it and just upload these 9 files to your gallery root

1. phpthumb.bmp.php
2. phpthumb.class.php
3. phpthumb.config.php.default    {dont forget to rename it before uploading to phpthumb.config.php}
4. phpthumb.filters.php
5. phpthumb.functions.php
6. phpthumb.gif.php
7. phpthumb.ico.php
8. phpthumb.php
9. phpthumb.unsharp.php

and fonts folder to /captcha/fonts

Delete the other remaining files & folders in Phpthumb folder, as they are not required
Which are

/cache        <--- Delete it
/demo        <--- Delete it
/docs         <--- Delete it
/fonts         <--- Delete it
/images      <--- Delete it
index.php    <--- Delete it

open phpthumb.config.php and

Code: [Select]
$PHPTHUMB_CONFIG['ttf_directory'] = dirname(__FILE__).'/fonts'; // Base directory for TTF font fileschange it to
Code: [Select]
$PHPTHUMB_CONFIG['ttf_directory'] = dirname(__FILE__).'/captcha/fonts'; // Base directory for TTF font files
open /templates/your template/media/jpg.html and

Code: [Select]
<img src="{media_src}" border="1" alt="{image_name}"{width_height} /><br />replace it with
Code: [Select]
<img src="phpThumb.php?src={media_src}&w=800&h=600" border="0" alt="{image_name}" >
Thats it,
you can see the result on these sites as a kind of demo

Hi there,

while adding images to site via "Check new images" in Detailed version.
we have the ability to give description, keywords and name to an image
but the problem is that the preview is loaded in its full resolution.

if i am adding multi amount of images at a time,
its really difficult for me on a dailup connection to wait for preview of each and every image.

i was wondering is it possible to resize preview of an image, like to shrink it down to a thumbnail size or a bit smaller size?

Discussion & Troubleshooting / 4images 1.7.6 and server load
« on: March 27, 2008, 08:20:19 AM »
i started running my site with 4images 1.7.6 this month
i am getting not more than 100 visitors a day.
still i got a message from my host about server load
according to them

I would suggest checking the scripts you are using as most scripts tend to be very resource intensive meaning they use up a very high amount of CPU and server memory.
Please check with the 3rd party script vendor to see what modifications can be made to help reduce server side usage.

Hope this helps and please keep us updated to what modifications are made.

i dont have any mod installed on my site except i have 6 random images on my frontpage.

please suggest me something.

I am releasing my first template for 4images, i tested it and it is working on 4images 1.7.6, click the link below to download it

plz give comments if you think something is missing(there must be lots of things missing coz i am not a good in html or php, if you find any let me know wht to include n wht to exclude)

Download link for template

Since the side bar is on right side of this template so you must make some changes, otherwise you will face problem with images on details.php
you have to do a few changes on details.html, jpg.html and funcion.php to view an image properly on details.htm

Changes you have to make are taken from this post orignally posted by Michi-w

jpg image size limit
 This mod will change the size of image on detail.html and by clicking the resized picture it will open in a new window with full image preview.



Code: [Select]
if ($image_info = @getimagesize($src, $info)) {
      $width_height = " ".$image_info[3];
      $width = $image_info[0];
      $height = $image_info[1];

after add :
Code: [Select]
if (($width > $height) && ($width > 550)){
               $new_limit = "550";
         $limit_var = "width";
   }elseif (($width < $height) && ($height > 550)){
         $new_limit = "550";
         $limit_var = "height";
   }else {
                      $new_limit = $image_info[0];
         $limit_var = "width";

Code: [Select]
"&amp;mode=".$mode : ""))."\">".$media_icon."</a>";
    $width_height = "";
    $width = "";
    $height = "";

after add :
Code: [Select]

    $limit_var = "";
    $new_limit = "";

Code: [Select]
      "media_src" => $media_src,
      "media_icon" => $media_icon,
      "image_name" => $image_name,
      "width_height" => $width_height,
      "width" => $width,
      "height" => $height,

after add :
Code: [Select]
     "new_limit" => $new_limit,
      "limit_var" => $limit_var,

(Should the extension be built, the details.html not change)

Code: [Select]
Replace with:
Code: [Select]
<a href="{media_src}" target="_blank">{image}</a>

Code: [Select]
<img src="{media_src}" border="1" alt="{image_name}"{width_height} /><br />
Replace with:
Code: [Select]
<img src="{media_src}" border="0" alt="{image_name}" {limit_var}="{new_limit}" />

Changes in size in the functions.php made by the change in the figures..
if (($width > $height) && ($width > 550)){
               $new_limit = "550";
         $limit_var = "width";
   }elseif (($width < $height) && ($height > 550)){
         $new_limit = "550";

Good luck with your new template

Templates & Styles (Requests & Discussions) / need help with thumbnail
« on: January 25, 2008, 07:46:57 AM »
Please someone help in using this image as a thumbnail shadow/border in thumbnail_bit.html

What is the best so far Conversion tool for thumbnails.
 i am facing problem with creating thumbnails and image resizing of images with size larger than 1 mb and dimension greater than 2000x. it gives me errors,
currently i am using  "GD bibliothek"

i am not good in php, plz move this post to its proper section if it is not right here.

i tried to used the top downloaded images code {lang_top_image_rating} {image_rating_1} n others on home.html

and added the below code of top downloads to index.php from top.php

// Downloads
$sql = "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_downloads,

c.cat_name".get_user_table_field(", u.", "user_name")."
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
        WHERE i.image_active = 1 AND i.cat_id NOT IN ($cat_id_sql) AND i.cat_id = c.cat_id
        ORDER BY i.image_downloads DESC, i.image_name ASC
        LIMIT 10";
$result = $site_db->query($sql);
$top_list = array();
$i = 1;
while ($row = $site_db->fetch_array($result)) {
  $top_list[$i] = $row;

for ($i = 1; $i <= 10; $i++) {
  if (isset($top_list[$i])) {
    $register_array['image_downloads_'.$i] = (check_permission("auth_viewimage",

$top_list[$i]['cat_id'])) ? "<a


\">".format_text($top_list[$i]['image_name'])."</a>" :

    $register_array['image_downloads_openwindow_'.$i] = (check_permission("auth_viewimage",

$top_list[$i]['cat_id'])) ? "<a


\" onclick=\"opendetailwindow()\"

target=\"detailwindow\">".format_text($top_list[$i]['image_name'])."</a>" :

    if (isset($top_list[$i][$user_table_fields['user_name']]) && $top_list[$i]['user_id'] !=

      $user_profile_link = (!empty($url_show_profile)) ? preg_replace("/{user_id}/",

$top_list[$i]['user_id'], $url_show_profile) :

      $register_array['image_downloads_user_'.$i] = "<a


    else {
      $register_array['image_downloads_user_'.$i] = $lang['userlevel_guest'];
    $register_array['image_downloads_cat_'.$i] = "<a


    $register_array['image_downloads_number_'.$i] =

  else {
    $register_array['image_downloads_'.$i] = "--";
    $register_array['image_downloads_user_'.$i] = "--";
    $register_array['image_downloads_cat_'.$i] = "--";
    $register_array['image_downloads_number_'.$i] = "--";



but i am getting this error.

DB Error: Bad SQL Query: SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_downloads, c.cat_name, u.user_name FROM (4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND i.cat_id NOT IN () AND i.cat_id = c.cat_id ORDER BY i.image_downloads DESC, i.image_name ASC LIMIT 10
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND i.cat_id = c.cat_id ORDER BY i.image_downloads DESC, i.' at line 4

how to remove this error
help needed plz anyone

Pages: [1]
Post your comments here