Author Topic: Every Wallpaper with star rating and cool border.  (Read 16600 times)

0 Members and 1 Guest are viewing this topic.

Offline ashfaq

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Re: Every Wallpaper with star rating and cool border.
« Reply #15 on: June 08, 2007, 03:00:50 AM »
Thanks guys for replying and helping me, as i know by CeJay given code of background i can show border but think it will also take time to page load, while it is better to draw border by css, well i think padding code will work i will check it and tell you, Thanks

Guys i need some modifications in my gallery as you are helping on thumb border topic i hope you will also hlep me on these modivications.

1: How to show 6 random wallpapers and 12 new wallpapers on main page ?
2: How to show categories in sidebar (Left or Right sidebar) ?
3: Is it possible to have small thumbnails on main page with the album name instead of folder icon ?
4: How to show my gallery random wallpapers or new wallpapers on any other site ?

I hope guys you will help me to setup my gallery and solver these issues...

Jacob

  • Guest
Re: Every Wallpaper with star rating and cool border.
« Reply #16 on: June 08, 2007, 09:02:48 AM »
Hey ashfaq

Quote
Don't just copy all stuff from other sites... make something original ;)

and about your question:

1: Use search of this forum ... (To edit no. of new images, edit index.php ..look for and edit $num_new_images = 6;)

2. For this, Search someplace like Dynamicdrive.com

3. Use search of this forum....

4. Use RSS feed of your gallery or for other way... again do search :)

Ok, the main answer, simply search this forum... you will have about 99% stuff you need  :lol:

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Every Wallpaper with star rating and cool border.
« Reply #17 on: June 08, 2007, 10:39:12 AM »
@Jacob and also @ashfaq
.... 100% correct ...  :wink:
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

manurom

  • Guest
Re: Every Wallpaper with star rating and cool border.
« Reply #18 on: June 08, 2007, 10:53:26 AM »
Hello;

1: How to show 6 random wallpapers and 12 new wallpapers on main page ?
------>> How can I show more new images on home page?
If you wish to show 6 random images, edit your index.php file and find:
Code: [Select]
$site_template->register_vars("new_images", $new_images);
unset($new_images);
Add after:
Code: [Select]
//-----------------------------------------------------
//--- Show 6 Random Images ---------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
  "has_rss"   => true,
  "rss_title" => "RSS Feed: ".format_text($config['site_name'], 2)." (".str_replace(':', '', $lang['new_images']).")",
  "rss_url"   => $script_url."/rss.php?action=images"
));

$imgtable_width = ceil(intval($config['image_table_width']) / $config['image_cells']);
if ((substr($config['image_table_width'], -1)) == "%") {
  $imgtable_width .= "%";
}

$additional_sql = "";
if (!empty($additional_image_fields)) {
  foreach ($additional_image_fields as $key => $val) {
    $additional_sql .= ", i.".$key;
  }
}

$num_random_images = 6;
$config['image_cells']=6;
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", 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 c.cat_id = i.cat_id AND i.cat_id NOT IN (".get_auth_cat_sql("auth_viewcat", "NOTIN").")
        ORDER BY RAND()
        LIMIT $num_random_images";
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);

if (!$num_rows)  {
  $random_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
  $random_images .= $lang['no_new_images'];
  $random_images .= "</td></tr></table>";
}
else  {
  $random_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
  $count = 0;
  $bgcounter = 0;
  while ($image_row = $site_db->fetch_array($result)){
    if ($count == 0) {
      $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
      $random_images .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    $random_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";

    show_image($image_row);
    $random_images .= $site_template->parse_template("random_image");
    $random_images .= "\n</td>\n";
    $count++;
    if ($count == $config['image_cells']) {
      $random_images .= "</tr>\n";
      $count = 0;
    }
  } // end while

  if ($count > 0)  {
    $leftover = ($config['image_cells'] - $count);
    if ($leftover >= 1) {
      for ($f = 0; $f < $leftover; $f++) {
        $random_images .= "<td width=\"".$imgtable_width."\">\n&nbsp;\n</td>\n";
      }
      $random_images .= "</tr>\n";
    }
  }
  $random_images .= "</table>\n";
} // end else

$site_template->register_vars("random_images", $random_images);
unset($random_images);

and then put the code {random_images} in your template home.html code, where you need to show these random images. Just be aware that it may cause some slowing display and maybe server issues.

2: How to show categories in sidebar (Left or Right sidebar) ?
------>> [MOD] Sitemap v1.0 by V@no

3: Is it possible to have small thumbnails on main page with the album name instead of folder icon ?
------>> [MOD] Category Image v1.0.2 by V@no

4: How to show my gallery random wallpapers or new wallpapers on any other site ?
------>> [Mod] Random image / Zufallsbild by Nicky
------>> new images on your homepage (external) by renoa heartilly

Offline ashfaq

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Re: Every Wallpaper with star rating and cool border.
« Reply #19 on: June 09, 2007, 03:02:05 AM »
Thanks all guys specially manurom for giving usefull links.
I will check all mods and if found any error then i will tell you.

I have found the code of how to draw broder around thumbnail, use below code in your style.css
Quote
padding: 4px 4px 4px 4px;

Offline ashfaq

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Re: Every Wallpaper with star rating and cool border.
« Reply #20 on: July 06, 2007, 09:49:59 AM »
How to control thumbnail background and border attributes as i have searched 4image default theme style.css and cant find any thumbnail section, so where to put this code to show border and background around thumbnails.

Code: [Select]
      border: 2px solid #98bc56;
   background-image: url('images/bg1.gif');
   height: 200px; 

Will we use  thumbnail-bit.html to put upper code but how to do all this ?
Also tell how to control thumbnail size ?
Plz help as you always did, i will be very thankfull.

Offline ashfaq

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Re: Every Wallpaper with star rating and cool border.
« Reply #21 on: July 07, 2007, 04:09:36 AM »
How to control thumbnail background and border attributes as i have searched 4image default theme style.css and cant find any thumbnail section, so where to put this code to show border and background around thumbnails.

Code: [Select]
      border: 2px solid #98bc56;
   background-image: url('images/bg1.gif');
   height: 200px; 

Will we use  thumbnail-bit.html to put upper code but how to do all this ?
Also tell how to control thumbnail size ?
Plz help as you always did, i will be very thankfull.

Will anyone plz help ?