4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: ashfaq on April 14, 2007, 05:43:00 PM

Title: Every Wallpaper with star rating and cool border.
Post by: ashfaq on April 14, 2007, 05:43:00 PM
 I wanna show every wallpaper of my gallery with star ratings so visitors and users can easily rate every wallpaper and also tell me how to draw border around every wallpaper, see image below for an example of start rating and border.

(http://img45.imageshack.us/img45/5886/starratingoz6.png)
Title: Re: Every Wallpaper with star rating and cool border.
Post by: KurtW on April 14, 2007, 05:59:19 PM
Hi

you must edit:
templates/default/thumbnail_bit.html


cu
Kurt
Title: Re: Every Wallpaper with star rating and cool border.
Post by: ashfaq on April 14, 2007, 06:03:34 PM
We will use thumbnail_bit to draw border but how to add start rating ?
Title: Re: Every Wallpaper with star rating and cool border.
Post by: KurtW on April 14, 2007, 06:31:37 PM
Hi,

http://www.4homepages.de/forum/index.php?topic=923.0 (http://www.4homepages.de/forum/index.php?topic=923.0)

Kurt
Title: Re: Every Wallpaper with star rating and cool border.
Post by: ashfaq on May 07, 2007, 06:50:49 PM
Thanks for giving link but in that thread we can show ratings in vertical style under wallpaper, tell me how to show start rating along aside wid wallpaper thumbnail i mean verticallly ?

Also tell me how to show 12 new and 6 random wallpapers on main page and 6 random wallpapers on every page ?
Title: Re: Every Wallpaper with star rating and cool border.
Post by: mawenzi on May 07, 2007, 09:30:50 PM
... i mean vertically ? ... create the new star images with ps or use the star images from the site which you refers  ...
... how to show 12 new ? ... http://www.4homepages.de/forum/index.php?topic=8946.0
... how to show 12 random ? ...  http://www.4homepages.de/forum/index.php?topic=4259.msg17513#msg17513
Title: Re: Every Wallpaper with star rating and cool border.
Post by: ashfaq on May 09, 2007, 04:18:11 AM
Thanks dear, now just tell me what code to put in "thumbnail_bit.html" to draw border.
Also give some attributes to draw border along thumbnails are put some spacing between thumbnail and border...
Title: Re: Every Wallpaper with star rating and cool border.
Post by: ashfaq on May 20, 2007, 03:12:44 AM
Thanks dear, now just tell me what code to put in "thumbnail_bit.html" to draw border.
Also give some attributes to draw border along thumbnails are put some spacing between thumbnail and border...
plz tell how to draw border around image (see upper picture) ?
Title: Re: Every Wallpaper with star rating and cool border.
Post by: CeJay on May 20, 2007, 08:43:03 AM
Just add border in your html (border="1")
Title: Re: Every Wallpaper with star rating and cool border.
Post by: ashfaq on May 21, 2007, 02:38:26 AM
Thanks dear i know this code but look at picture and tell me to draw border as is in picture i mean border is not sticked with image but there is space between image and border, how to put this space ?
Title: Re: Every Wallpaper with star rating and cool border.
Post by: CeJay on May 21, 2007, 07:52:23 PM
My fault, I wasn't thinking when I last posted.
I believe you can set your border permissins in your style.css file.

Example:
Quote
.thumb {
   border: 2px solid #98bc56;
   cursor: hand;
   height: 200px;
   background-color: #ffffe1;
   }
and
Quote
.thumb2 {
   border: 2px solid #98bc56;
   background-image: url('images/bg1.gif');
   height: 200px;
   }

This is what I have, so you could probably edit yours to your liking.
Title: Re: Every Wallpaper with star rating and cool border.
Post by: ashfaq on May 22, 2007, 02:39:54 AM
Thanks dear i hope this code will work, i will check and tell you.
Thanks again.
Title: Re: Every Wallpaper with star rating and cool border.
Post by: ashfaq on June 07, 2007, 03:01:26 AM
My fault, I wasn't thinking when I last posted.
I believe you can set your border permissins in your style.css file.

Example:
Quote
.thumb {
   border: 2px solid #98bc56;
   cursor: hand;
   height: 200px;
   background-color: #ffffe1;
   }
and
Quote
.thumb2 {
   border: 2px solid #98bc56;
   background-image: url('images/bg1.gif');
   height: 200px;
   }

This is what I have, so you could probably edit yours to your liking.
CeJay dear i have checked your given code and its not working as it only put border around image but it didnt put space between image and border, the main problem is how to make spacing between image and border ? If anyone plz tell me the code... ?
(http://img485.imageshack.us/img485/7677/starratingoz6gn8.png)
Title: Re: Every Wallpaper with star rating and cool border.
Post by: Jacob on June 07, 2007, 05:23:17 AM
If your thumbnails size is 100x75px, then make the background image of like 105x78px and use the css tags (background-image: url('images/bg1.gif');) are suggested by CeJay
Title: Re: Every Wallpaper with star rating and cool border.
Post by: CeJay on June 07, 2007, 09:25:36 AM
If the background doesn't or didn't work to your liking did you try cell padding in the thumbnail_bit.html?
By default I do not believe there is any (unless it is in css - which I didnt look close).
To start you can make a setting like so: cellpadding="5"
then adjust it to your liking if it works. I have not tried it, but I did have it in my code as "0" (part of the WallPaper Template (http://www.4homepages.de/forum/index.php?topic=12293.0)).

Here is my original HTML for thumbnail_bit.html looked like (with a little modifications):
Code: [Select]
<table width="100%" border="0" cellpadding="7" cellspacing="0">
  <tr>
    <td height="212" align="center" valign="middle" class="thumb" onmouseover="this.className='thumb2'" onmouseout="this.className='thumb'"><!-- you wish detail page in a small javascript open window, use {thumbnail_openwindow} -->
      <table width="118" height="124" border="0" cellpadding="0" background="{template_url}/images/bg2.gif">
        <tr>
          <td align="center" valign="middle"><table border="0" cellpadding="0"  background="{template_url}/images/lc.gif">
              <tr>
                <td>{thumbnail}{if image_is_new}<br />
                    <div align="center" ><sup class="new">{lang_new}</sup>{endif image_is_new}</div></td>
              </tr>
          </table></td>
        </tr>
      </table>
      <p>{lightbox_button}<br>
        <b>{image_name}</b>  ({user_name_link})<br>
        <a href="{cat_url}">{cat_name}</a><br />
{if allow_comments}{lang_comments} {image_comments}{endif allow_comments}    </td>
  </tr>
</table>

Title: Re: Every Wallpaper with star rating and cool border.
Post by: ashfaq 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...
Title: Re: Every Wallpaper with star rating and cool border.
Post by: Jacob 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:
Title: Re: Every Wallpaper with star rating and cool border.
Post by: mawenzi on June 08, 2007, 10:39:12 AM
@Jacob and also @ashfaq
.... 100% correct ...  :wink:
Title: Re: Every Wallpaper with star rating and cool border.
Post by: manurom 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? (http://www.4homepages.de/forum/index.php?topic=8946.0)
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 (http://www.4homepages.de/forum/index.php?topic=9299.0)

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 (http://www.4homepages.de/forum/index.php?topic=6922.0)

4: How to show my gallery random wallpapers or new wallpapers on any other site ?
------>> [Mod] Random image / Zufallsbild by Nicky (http://www.4homepages.de/forum/index.php?topic=1020.msg5231#msg5231)
------>> new images on your homepage (external) by renoa heartilly (http://www.4homepages.de/forum/index.php?topic=16915.0)
Title: Re: Every Wallpaper with star rating and cool border.
Post by: ashfaq 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;
Title: Re: Every Wallpaper with star rating and cool border.
Post by: ashfaq 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.
Title: Re: Every Wallpaper with star rating and cool border.
Post by: ashfaq 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 ?