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

Pages: 1 [2] 3
16
Quote from: Jan
Put this in the two queries:
Code: [Select]
AND a.cat_id IN (4, 9, 15)
Greets Jan


Thx  :)

17
Hi Nicky, thanks for all the support, one more question which was not answered before:

How can I choose from more than one category?
I would like to randomize from a category and it's subcategories, so for example cat id = 4 & 9 & 15.

Can this be done?

Thanks,
best regards,
Harry

18
Mods & Plugins (Requests & Discussions) / wishlist -> Postcards
« on: August 09, 2002, 10:00:23 AM »
Hi Nicky and Jan,

If you have not finished the next version yet, here is what I would like to see most in it...  8)

I like the postcards feature and was wondering if this can be added:

- admin: see how many postcards have been sent, which image is sent most etc.
- user: (choose to) get a notification if the card is being picked up

By the way, where is the #days the card is kept in the dbase defined?

Thanks,
best regards,
Harry

19
oh, one more tiny question, how do I define the category name to be used in the caption or alt tag?

Thanks for your help, can't wait to send you guys my first ecard :-)

Harry

20
Quote from: Nicky
@Harry,

here is it:
http://www.nicky.net/4images/random_more_pics.txt

for certain category add this: http://www.4homepages.de/forum/viewtopic.php?p=4360#4360

Not exactly, but I like it  :wink:

This works for most of my pages, I like that there is little chance of double images.

But on some of my pages I would like to choose from 2 different categories.
If I include like this:
Code: [Select]
<?php include("random_cat1.php"?>
<?php include("random_cat2.php"?>
<?php include("random_cat1.php"?>
<?php include("random_cat2.php"?>
<?php include("random_cat1.php"?>

It works, but chances are high I get double images.

Can I also let the random-more-pics.php file choose from more than one category?

Thanks for your help,
best regards,

Harry

21
Hi Nicky & Jan,

I was wondering if there is a possibility to call for x number of random images. It will not work if I just copy the random.php file multiple times

"Cannot redeclare class db in /images/includes/db_mysql.php on line 25"

and

"Cannot redeclare" errors when I copy random.pho and past as random2.php and comment out the includes in random2.php.

Can you help? Would like to display 3 or 4 images from a certain category.

Thanks in advance,
best regards,

Harry

22
Feedback & Suggestions / Auto resize for non admin users?
« on: July 25, 2002, 03:53:54 PM »
Hi Jan  & Nicky,

first of all my compliments for staying so polite when too many posters are just simply demanding support for their problems...

If I were you, I would have ingored many posts..

Anyway, what I would like to ask or suggest is:
When somebody uploads a picture larger than my max size (650 wide, so it won't ruin my 800 wide tabled site) they wil get an error message saying it's too large.

Is there a way these pictures can be resized to the max size automatically (only if they are too large, not enlargen the pics if they are smaller)?

If you upload a picture as an admin you do not have the size restrictions and you can resize the image afterwards, but I would like to do it automatically. (see http://summitpost.com for an example of how this coul look like. These guys wrote their own code as well)

One other option would be to allow every size picture and be able to resize them when validating.

I welcome your thoughts,
thanks in advance,
best regards,

Harry

23
Feedback & Suggestions / Yabb anyone?
« on: July 25, 2002, 03:41:01 PM »
Hi Jan,

I know I am crossing the line of getting you to program for me, but I personally prefer YABB (www.yabb.info). It's great, easy, PHP and free...

So if you can help with a fix to avoid double logins for users I would be grateful. If not, thanks anyway  :wink:

24
Discussion & Troubleshooting / Bug in dropdown function?
« on: July 17, 2002, 10:52:21 AM »
Quote from: Jan Sorgalla
Ok, i see. The PHP Code for the functions you posted above is not original one. Maybe you opened it in a HTML-Editor who corrupted the code. Replace "includes/functions.php" with the originla one and try it again.

Greets Jan


YAAM (Yet Another Aha Moment) :wink:

Thanks, that seems to work, normally I open the php files with Notepad, but must have done it with Frontpage once (which _is_ useful for the Template files) and it immediatly begins 'fixing' what is not broken... :roll:

Thanks for the quick and good support,
best regards,

Harry

25
Discussion & Troubleshooting / Bug in dropdown function?
« on: July 17, 2002, 10:26:04 AM »
Quote from: Jan Sorgalla
Can you give us a link to see this in action?

Greets Jan


Hi Jan, just sent it you by email,

thanks,

Harry

26
Discussion & Troubleshooting / Bug in dropdown function?
« on: July 17, 2002, 09:01:35 AM »
Hello Jan & Nicky,

While working on getting the  templates right for my site I noticed that there is a problem with the dropdown list of categories (jump buttons)

I cleaned out the My Sql and did a new install, but the problem remains ( I did not re-upload the programfiles as I changed some of them, but none of the dropdown files)

Anyway after adding a 1st category (Kilimanjaro) the dropdown list looks like this:


You can not choose for the category, the name of the category seems switched somehow with the text next to the option?

When I add a 2nd category, the dropdown in the admin panel has the same problem:

So I cannot choose to create a subdirectory under the 1st category

So I add it as a new category, bu then the dropdown list (home) looks like this:

The top drowdown is teh same, a new on is added as shown.

Is this a bug?
Where should I look for the code?

This is the code I could find in functions.php, bu tdo not know if this is the problem:

Code: [Select]
function get_category_dropdown_bits($cat_id, $cid = 0, $depth = 1) {
  global $site_db, $drop_down_cat_cache, $cat_cache;

  if (!isset($drop_down_cat_cache[$cid])) {
    return "";
  }
  $category_list = "";
  foreach ($drop_down_cat_cache[$cid] as $key => $category_id) {
    if (check_permission("auth_viewcat", $category_id)) {
      $category_list .= "<select>
<option value=\"".$category_id."\"";
      if ($cat_id == $category_id) {
        $category_list .= " selected=\"selected\"";
      }
      if ($cat_cache[$category_id]['cat_parent_id'] == 0) {
        $category_list .= " class=\"dropdownmarker\"";
      }

      if ($depth > 1) {
        $category_list .= ">".str_repeat("--", $depth - 1)." ".$cat_cache[$category_id]['cat_name']."</option>\n";
      }
      else {
        $category_list .= ">".$cat_cache[$category_id]['cat_name']."</option>\n";
      }
      $category_list .= get_category_dropdown_bits($cat_id, $category_id, $depth + 1);
    }
  }
  unset($drop_down_cat_cache[$cid]);
  return $category_list;
}

function get_category_dropdown($cat_id, $jump = 0, $admin = 0, $i = 0) {
  global $lang, $drop_down_cat_cache, $cat_parent_cache;
  // $admin = 1  Main Cat (update/add cats)
  // $admin = 2  All Cats (find/validate images...)
  // $admin = 3  Select Cat (update/add image)
  // $admin = 4  No Cat (check new images)

  switch ($admin) {
  case 1:
    $category = "\n
</select><select name=\"cat_parent_id\" class=\"categoryselect\">\n";
    $category .= "<option value=\"0\">".$lang['main_category']."</option>\n";
    $category .= "<option value=\"0\">--------------</option>\n";
    break;

  case 2:
    $category = "\n
</select><select name=\"cat_id\" class=\"categoryselect\">\n";
    $category .= "<option value=\"0\">".$lang['all_categories']."</option>\n";
    $category .= "<option value=\"0\">-------------------------------</option>\n";
    break;

  case 3:
    $i = ($i) ? "_".$i : "";
    $category = "\n
</select><select name=\"cat_id".$i."\" class=\"categoryselect\">\n";
    $category .= "<option value=\"0\">".$lang['select_category']."</option>\n";
    $category .= "<option value=\"0\">-------------------------------</option>\n";
    break;

  case 4:
    $category = "\n
</select><select name=\"cat_id\" class=\"categoryselect\">\n";
    $category .= "<option value=\"0\">".$lang['no_category']."</option>\n";
    $category .= "<option value=\"0\">-------------------------------</option>\n";
    break;

  case 0:
  default:
    if ($jump) {
      $category = "\n
</select><select name=\"".URL_CAT_ID."\" onchange=\"if (this.options[this.selectedIndex].value != 0){ forms['jumpbox'].submit() }\" class=\"categoryselect\">\n";
    }
    else {
      $category = "\n
</select><select name=\"".URL_CAT_ID."\" class=\"categoryselect\">\n";
    }
    $category .= "<option value=\"0\">".$lang['select_category']."</option>\n";
    $category .= "<option value=\"0\">-------------------------------</option>\n";
  } // end switch

  $drop_down_cat_cache = array();
  $drop_down_cat_cache = $cat_parent_cache;
  $category .= get_category_dropdown_bits($cat_id);
  $category .= "</select>\n";
  return $category;
}


(I have not changed anything in here)

Thanks in advance for your help,


best regards

27
Mods & Plugins (Releases & Support) / [Mod] Star Rating
« on: July 16, 2002, 12:06:22 PM »
Quote from: Jan Sorgalla
Hi,

includes/constants.php:

Code: [Select]
define('MAX_RATING', 5);

Jan


 :idea:  (another aha moment)  :wink:
Yep, that works,

thanks a lot, best regards,

Harry

28
Mods & Plugins (Releases & Support) / Re: [Mod] Star Rating
« on: July 16, 2002, 12:02:07 PM »
Quote from: Nicky
// OPEN / ÖFFNE includes/functions.php:


// ADD AFTER / HINZUFÜGEN DANACH

Code: [Select]

  if ($image_row['image_rating'] == '5.00') {
     $rating_pic = "5.gif";
  } elseif ($image_row['image_rating'] >= '4.00') {
     $rating_pic = "4.gif";
  } elseif ($image_row['image_rating'] >= '3.00') {
     $rating_pic = "3.gif";
  } elseif ($image_row['image_rating'] >= '2.00') {
     $rating_pic = "2.gif";
  } elseif ($image_row['image_rating'] >= '1.00') {
     $rating_pic = "1.gif";
  } else {
     $rating_pic = "0.gif";
  }
  $site_template->register_vars("rating_pic", $rating_pic);




Hi Nicky, this is a cool feature and it works;
only I want to have a rating possible from 1-7, I altered the code above and added extra Gifs. Also changed the rating form, adding option "6" and "7",

but when I try to rate something "6" or "7" I get an "invalid rating" error.

Where is it defined that only 1-5 can be rated?

Thanks for your help,
with best regards,

Harry

29
Discussion & Troubleshooting / Multiple CSS & templates ?
« on: July 15, 2002, 06:04:51 PM »
Quote from: Jan Sorgalla
{user_box} is defined at the bottom of "includes/page_header.php". You can register new template variables with:

Code: [Select]
$site_template->register_vars(array(
  "menu" => "Content of menu",
  "variable2" => "Test Test"
));


Greets Jan


Danke Schoen Jan,

great support for a great product; I will start hacking away now and hope to share the endresult soon :)

Thanks,
best regards,

Harry

30
Discussion & Troubleshooting / Multiple CSS & templates ?
« on: July 13, 2002, 11:53:44 AM »
Aha!  :)

That's a simple but quite elegant solution. And what's even better: it works  :wink:

First I will have to get the basic template right though and then copy it.

Can you tell me where the {user_box} is being defined? I want to make it a part of my regular menu.

(added:) Also can I define something myself, like {menu} ?

Thanks in advance,
best regards,

Harry

Pages: 1 [2] 3