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

Pages: 1 2 3 [4]
46
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


Quote
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.

Demo: http://www.wallpaperhall.com

includes/functions.php

find:
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";
      }

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

after add :
Code: [Select]

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

find:
Code: [Select]
     $site_template->register_vars(array(
      "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,


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

search:
Code: [Select]
{image}
Replace with:
Code: [Select]
<a href="{media_src}" target="_blank">{image}</a>
templates\default\media\jpg.html

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}" />


Quote
Changes in size in the functions.php made by the change in the figures..
Quote
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

47
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


48
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"

49
ok let me explain it a bit more

i want to show "Latest 10 NEW images" and "Latest 10 New Categories/sub catergories" added to my gallery's Index page

just like previously with your help i added "Top 10 images by votes" and "Top 10 images by downloads" to my gallery's Index page

50
help !
anyone please

51
thunderstrike,
is there any way how to show "new 10 images" & "new or popular 10 categories/sub categories" added in same style as top 10 downloads and votes

52
no reply from any one :(

xox, where are you man. i need help

53
i dont want Cat n img keywords with links but will still use it as i think it is a nice SEO mod for 4images.
but the problem is that it completely change category name like

category path is  Bahram Jan this Seo mod changes it to cat-lahram-tan-20.htm

any solution for this. ? to get it as cat-bahram-jan-20.htm

54
Mods & Plugins (Requests & Discussions) / Re: User request page
« on: October 24, 2007, 04:29:05 AM »
hmmmmmm i am also looking for such thing, a Mod through which a user can request for something (images, mp3 etc) and the requested items are then listed on a page, and can be seen by everyone or registered users.

55
it is working now after putting that line above the //downloads code :D thanks thunderstrike for your kind reply but need a little more help.

i thought i will put that line above the other 3 codes and they will start working too, but they aren't
can you please help me now with the other options, [  // Hits  -   // Votes   and  //ratings  ] the code line you gave only works for //downloads


ahhhhh its ok i think it was a cache problem.


56
the one you mentioned is really a nice Mod for statistics but i want to show something like this as i re-arranged it on top.php

i hope from this snapshot you will get what i am trying to ask :D


57
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

Quote
// 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")."
        FROM (".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c)
        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
        $cat_match_sql
        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;
  $i++;
}
$site_db->free_result();

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

href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."

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

format_text($top_list[$i]['image_name']);
    $register_array['image_downloads_openwindow_'.$i] = (check_permission("auth_viewimage",

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

href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."

\" onclick=\"opendetailwindow()\"

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

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

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

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

ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$top_list[$i]['user_id'];
      $register_array['image_downloads_user_'.$i] = "<a

href=\"".$site_sess->url($user_profile_link)."\">".format_text($top_list[$i][$user_table_fields

['user_name']])."</a>";
    }
    else {
      $register_array['image_downloads_user_'.$i] = $lang['userlevel_guest'];
    }
    $register_array['image_downloads_cat_'.$i] = "<a

href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$top_list[$i]['cat_id'])."\

">".format_text($top_list[$i]['cat_name'])."</a>";
    $register_array['image_downloads_number_'.$i] =

"<b>".$top_list[$i]['image_downloads']."</b>";
  }
  else {
    $register_array['image_downloads_'.$i] = "--";
    $register_array['image_downloads_user_'.$i] = "--";
    $register_array['image_downloads_cat_'.$i] = "--";
    $register_array['image_downloads_number_'.$i] = "--";
  }
}

$site_template->register_vars($register_array);


//-----------------------------------------------------

but i am getting this error.

Quote
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 2 3 [4]