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

Pages: [1]
1
This will add a reflection under all your 4images thumbs.. kinda neat..

Example image below.

Please read this whole post before editing so you know all the options.

Files Edited:
function.php
header.html
style.css
--------------------------------

First open function and find
Code: [Select]
$thumb = "<img src=\"".$file_src."\" border=\"".$config['image_border']."\"".$width_height." alt=\"".$image_name."\" />";
Change too
Code: [Select]
$thumb = "<img src=\"".$file_src."\" border=\"".$config['image_border']."\"".$width_height." class=\"reflect rheight33\" alt=\"".$image_name."\" />";
---------

Now download the attachment and unzip and upload (reflection.js) to your root (public_html)

Log into your admin and edit templates

Now open style.css

Add
Code: [Select]
img { border: 0; }
Open header.html
Add
Code: [Select]
<script type="text/javascript" src="reflection.js"></script>At the very top line.

Visit your index.php and see if it works.. it will work on every page that shows thumbs (including random image and any extra code you added that shows thumbs)

Extra options

Varying the Height
You can vary the height of a reflection by adding rheight followed by the desired height in percent to the CSS class list.

To use a reflection 33% the height of the original image:

class="reflect rheight33"

Tip: Especially for larger photographs, small reflections work really well (try 10%).

Varying the Opacity
You can vary the opacity of a reflection by adding ropacity followed by the desired opacity in percent to the CSS class list.

To use a reflection with 30% opacity:

class="reflect ropacity30"

You can combine these two options. To create a 80% height 40% opacity reflection use:

class="reflect rheight80 ropacity40"

Scripting Reflections
If you want tons of flexibility, use scripted reflections. You can make your reflections respond to user actions (e.g. changing the reflection opacity when the image is hovered over) or add reflections to scripts such as Lightbox.

Reflection.add(image, options);

Adds or modifies a reflection to an image using Javascript. If the image is already reflected but the specified opacity or height has changed, the reflection will be changed accordingly.

image should be an image element.

options can contain a value for opacity or height. Both values should be between 0 and 1.

Reflection.add(document.getElementById("ohboy"), { height: 3/4, opacity: 2/3 });
Reflection.remove(image);

Removes the reflection from an image.

2
great mod.. works perfectly.

I did find a problem with the search results

The link in thumb images after search is img[image_number].search.htm  ex: img123.search.htm

Just add this to your .htaccess and it should work perfect
Code: [Select]
RewriteRule ^img([0-9]+)\.search.htm$ details.php?image_id=$1&%{QUERY_STRING}

3
I use to get 190+ spam messages every morning (Viagra, rolex, blah blah) now.. zero cuz of this mod.. but.. I almost thought it was funny.. I just search for http in comments message and just delete them with one click.. but the spammers don't know that.. so I felt like I'm working for them.. with this mod.. their messages don't get added..

Awesome mod. INSTALL IT!!!

4
http://www.4homepages.de/forum/index.php?topic=11405.0

use that..

I get about 20 to 190 spam messages a day in my comments and that worked perfect.. I searched for http in comment body or in header  since I added that.. and got ZERO   cuz spammers will always add http.. so now I don't have to remove spam messages.. great mod.

btw.. if you had spam in your comments it's not small.. it's a big network in russia.. malaysia.. germany .. india all tied together.. so don't feel like your being targeted.. it's everybody.

5
Mods & Plugins (Requests & Discussions) / AJAX Comments
« on: March 23, 2007, 04:53:59 AM »
I've installed the rate using ajax, how hard would it be to make one for comments? that way the page doesn't have to reload.

VANO? got any ideas?

6
Templates & Styles (Requests & Discussions) / Re: Home Page effect
« on: February 18, 2007, 08:13:34 AM »
The best thing to do, is not add it.. just make a flash logo with that sprite.

7
I'm trying to edit {new_images} Random Code to only get from a specific category.. I searched this forum for 2 hours and couldn't find one for new images

Can't figure out what to change...
Code: [Select]
//-----------------------------------------------------
//--- Show New 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;
  }
}

$new_cutoff = time() - 60 * 60 * 24 * $config['new_cutoff'];
$num_new_images = $config['image_cells'];
$sql = "SELECT IF(i.image_date >= $new_cutoff,RAND()+1,1) as random_no, 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 IN (".get_auth_cat_sql("auth_viewcat").")
       ORDER BY random_no DESC, i.image_date DESC
       LIMIT $num_new_images";
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);

if (!$num_rows)  {
  $new_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
  $new_images .= $lang['no_new_images'];
  $new_images .= "</td></tr></table>";
}
else  {
  $new_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;
      $new_images .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    $new_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";

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

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

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

8
I've added {categories} code (below) to categories.php and I get a sql error.

Coded added
[qcode]//-----------------------------------------------------
//--- Show Categories ---------------------------------
//-----------------------------------------------------
$categories = get_categories(0);
if (!$categories)  {
  $categories = $lang['no_categories'];
}
$site_template->register_vars("categories", $categories);
unset($categories);

unset($random_cat_image);[/qcode]

Error:
[qcode]DB Error: Bad SQL Query: UPDATE 4images_categories SET cat_hits = cat_hits + 1 WHERE cat_id = 1
Table 'test_click.4images_categories' doesn't exist[/qcode]

Works in everything but categories.php, login.php and member.php

I searched but couldn't find the thread to help me.

9
Feedback & Suggestions / Re: is that good antihotlink measure
« on: August 17, 2006, 07:48:52 AM »
This ia genius way to hot link protect!

The only 404's you would get are the people who are hotlinking the file.. I really hate hotlinkers.. bandwidth is not cheap and regardless what hosting companies say about "unlimited bandwidth" It's a myth!

10
Discussion & Troubleshooting / Re: Disabling Hotlinking
« on: August 15, 2006, 02:59:43 AM »
Couldn't you deny all from anything that gives no referrer?  I'm having the same problem with my site.. 900 gigs and it's the 14th out of 1500 for the month and I have alot of people embedding my videos in forums and blogs.

Do you know if flv player gives a referrer?

11
Discussion & Troubleshooting / Re: I broke it
« on: June 03, 2006, 11:49:11 AM »
Templates>Media>jpg.html  copy that to your desktop, rename to psd.html. upload back to folder media.

then go into your admin > settings and add psd to your allowed extentions and your done.


12
Sorry.. It said Request.


Thanks nino.

If someone has the rewrite installed.

RewriteRule ^games\.html$ rss.php?cat_id=3
that way you don't have the query string.

I'm learning php and sql but not good enough to know exactly what to edit.

13
I was wondering if anybody has made a RSS feed for each category.

game.php for all game category
pictures.php for all pictures etc..

Code: [Select]
<?
/*************************************************
* RSS Feed for 4images *
* beta 0.1 *
* Email:
*/

//------------ CONFIG ----------------------------

$num_new_images = 50;
/*
u can uncomment this, if you want to use config variables from 4images config
$num_new_images = $config['image_cells'];
*/

//because we have no session here, we have to hardcode this values
define('SCRIPT_URL', 'sitename'); //no trailing slash
define('LANGUAGE', 'EN');

define('ROOT_PATH', '');

//----- END CONFIG--------------------------------------------

include(ROOT_PATH.'global.php');
$main_template = 'rsss';

$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_thumb_file, i.image_media_file, i.image_keywords, i.image_date, i.image_active, c.cat_name, c.cat_description
        FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
        WHERE i.image_active = 1 AND c.cat_id = i.cat_id
        ORDER BY i.image_date DESC
        LIMIT $num_new_images";


$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);
$format="Y-m-d\TH:i:s+00:00"; //the time format for rss date
while($image_row = $site_db->fetch_array($result)){
if (!check_media_type($image_row['image_media_file']))
  {
    $file_src = ICON_PATH."/404.gif";
  }
  else
  {
    if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
    {
      $file_src = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
    }
    else
    {
      $file_src = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
    }
  }
  $image_info = @getimagesize($file_src);
  $width_height = (!empty($image_info[3])) ? " ".$image_info[3] : "";
  $file_src = SCRIPT_URL."/".str_replace(ROOT_PATH, "", $file_src);
  $thumb = "<a href=\"".SCRIPT_URL."/media".$image_row['image_id'].".html\"><img src=\"".$file_src."\" border=\"1\"".$width_height." alt=\"".$image_row['image_name']."\" /></a>";
$site_template->register_vars(array(
"title" => $image_row["image_name"],
"description" => $image_row["image_description"],
"category_domain" => SCRIPT_URL."/cat".$image_row["cat_id"].".html",
"category" => $image_row["cat_name"],
"cat_description" => $cat_cache[$cat_id]['cat_description'],
"link" => SCRIPT_URL."/media".$image_row["image_id"].".html",
"date" => format_date($format,$image_row["image_date"]),
"thumbnail" => $file_src,
));
$new_images.=$site_template->parse_template("rsssitem");
}

//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(
array(
"ctitle" => $config['site_name'],
"clink" => SCRIPT_URL,
"cdescription" => $config['site_name']." RSS Feed",
"language" =>LANGUAGE,
"ititle" =>"",
"iurl" => SCRIPT_URL."/".TEMPLATE_PATH."/images/header_logo.gif",
"ilink" => SCRIPT_URL,
"items" => $new_images,
)
);
header("Content-type: text/xml");
$site_template->print_template('<?xml version="1.0" encoding="ISO-8859-1"?>'.$site_template->parse_template($main_template));
?>

Can someone show me what to edit to just display a specific category and the rest I can figure out.  (the RSSS <-- was so I could edit without screwing up the working feed.)

aim: zoomos

14
How would I change

{prev_image_url} and {next_image_url}  so it will work with mod_rewrite

and {paging}

Help v@no, you like a god in this forum lol

Pages: [1]