4images Forum & Community

4images Issues / Ausgaben => Feedback & Suggestions => Topic started by: Western Rhythm on May 03, 2002, 09:24:18 PM

Title: 2 errors or Bugs in 1.5
Post by: Western Rhythm on May 03, 2002, 09:24:18 PM
Excellent :) Love the program, I have however found two errors in the Admin.
when you click on templates I get this error

"Warning: Unterminated comment starting line 2 in /home/virtual/www.westernrhythm.com/photogallery/admin/templates.php on line 2"

And when I click on Reset Stats: I get this error;

"Parse error: parse error, unexpected '>' in /home/virtual/www.westernrhythm.com/photogallery/admin/stats.php on line 49"


cheers
[/b]
Title: More errors
Post by: Western Rhythm on May 03, 2002, 09:47:04 PM
When users add images, the images are not automatically activated and put into the selected gallery, even when an admin uploads it from the main program.
Title: 2 errors or Bugs in 1.5
Post by: Nicky on May 03, 2002, 10:19:30 PM
hi,

well, the uploaded user image should not be automatically activated...

why ?

think twice....
example: user have uploaded porn pic...   :roll:

about stats.php and templates.php..
on *nix and windows server no errors generated..
Title: Great Job !
Post by: goyo on May 04, 2002, 03:43:43 AM
There will be an automatic imageactivation, in the feature releases ?
I know my registered users, I dont want to activate every image every time.

Otherwise a really GREAT AND CLEAN JOB!
Title: errors
Post by: Western Rhythm on May 04, 2002, 07:09:57 AM
Thats not what I mean, there is an option for that to ask for validation first. But that doesn't work either. I uploaded the pic as a registered user, went to the admin area and couldn't find the picture, it had been uploaded but it wasn't in the directory waiting for validation.

Yes its definately not working, any user that uploads a photo, the photo does not show up in the validation area, or in the new images area.
I'm using a linux server by the way
Title: 2 errors or Bugs in 1.5
Post by: Western Rhythm on May 04, 2002, 07:43:35 AM
Code: [Select]
"Warning: Unterminated comment starting line 2 in /home/virtual/www.westernrhythm.com/photogallery/admin/templates.php on line 2"
I just fixed.

 Still recieving this parse error on the stats file:
Code: [Select]
"Parse error: parse error, unexpected '>' in /home/virtual/www.westernrhythm.com/photogallery/admin/stats.php on line 49"


I don't understand the error as I checked the code and it looks totally fine. There is no extra '>'
Title: 2 errors or Bugs in 1.5
Post by: Jan on May 04, 2002, 10:18:32 AM
Ok, stats.php is a little bit buggy. I will fix it! Thanks.

Jan
Title: Validate Images
Post by: Western Rhythm on May 04, 2002, 11:10:37 AM
Hi, sorry to post this again,

Validate Images in not working in the admin.
anyone else having this problem? I'm searching for images and none are being picked up.
Title: 2 errors or Bugs in 1.5
Post by: Jan on May 04, 2002, 11:19:36 AM
Check if the image ist saved directly to the database. If you upload images as Admin, it will be always saved directly to the database.

Jan
Title: Same thing
Post by: Western Rhythm on May 04, 2002, 11:43:43 AM
Happens just as a normal user as well. So maybe all are being saved directly to the database? The photo is not activated either, and doesn't activate unless u go to 'edit images' and search for it and do it yourself.
Title: Re: Same thing
Post by: Jan on May 04, 2002, 11:51:40 AM
Quote from: Western Rhythm
Happens just as a normal user as well. So maybe all are being saved directly to the database?

Check the category permissions. Go to the edit screen of the category and check what permissions you have set to "Direct upload"

Quote from: Western Rhythm
The photo is not activated either, and doesn't activate unless u go to 'edit images' and search for it and do it yourself.


See: http://www.4homepages.de/forum/viewtopic.php?p=1150#1150
Title: error
Post by: Western Rhythm on May 08, 2002, 04:55:10 AM
I've been messing around with this as well, and I was wondering why it wouldn't appear in the gallery or in the validate images. And now I know why. As a guest u can upload on my gallery, but the program doesn't recognise a guest as a user and so the image won't appear in the validate image section. YOu have to seach in the edit image to find the image...

Is this a bug? At the moment I do not want to use the user database for the gallery because I have forums for that, so can I either integrate the two or find out whats wrong?
Title: bugs
Post by: Western Rhythm on May 08, 2002, 04:57:36 AM
another two bugs,

Editing an Image: tries to upload the image again, when all you want to do is edit the fields...

Admin login: doesn't carry through to the control panel. You have to login again... don't know if this is a bug...

other then that very happy :)
Title: bug reset stats
Post by: kmd600 on May 19, 2002, 02:34:04 PM
new code for: your domain/gallery/admin/stats.php
stats.php

Code: [Select]
<?php

define
&#40;'IN_CP', 1&#41;;
define&#40;'ROOT_PATH', './../'&#41;;
require&#40;'admin_global.php'&#41;;

if &#40;$action == ""&#41; &#123;
  
$action "resetstats";
&
#125;

show_admin_header&#40;&#41;;

if &#40;$action == "updatestats"&#41; &#123;
  
$cat_hits intval&#40;$HTTP_POST_VARS['cat_hits'&#93;&#41;;
  
$image_hits intval&#40;$HTTP_POST_VARS['image_hits'&#93;&#41;;
  
$image_downloads intval&#40;$HTTP_POST_VARS['image_downloads'&#93;&#41;;
  
$image_rating trim&#40;$HTTP_POST_VARS['image_rating'&#93;&#41;;
  
$image_votes intval&#40;$HTTP_POST_VARS['image_votes'&#93;&#41;;
  
  
echo "<b>".$lang['nav_categories_edit'&#93;."</b><br />";
  
if &#40;$cat_hits != ""&#41; &#123;
    
echo $lang['field_hits'&#93;."...";
    
flush&#40;&#41;;
    
$result $site_db->query&#40;"UPDATE ".CATEGORIES_TABLE." 
                               
SET cat_hits $cat_hits"&#41;;
    
    echo &#40;
$result&#41; ? "<b>OK</b><br />" &#58; "<b><span class=\"marktext\">ERROR</span></b><br />";
  &
#125;
  
  
echo "<br /><br /><b>".$lang['nav_images_edit'&#93;."</b><br />";
  
if &#40;$image_hits != ""&#41; &#123;
    
echo $lang['field_hits'&#93;."...";
    
flush&#40;&#41;;
    
$result $site_db->query&#40;"UPDATE ".IMAGES_TABLE." 
                               
SET image_hits $image_hits"&#41;;
    
    echo &#40;
$result&#41; ? "<b>OK</b><br />" &#58; "<b><span class=\"marktext\">ERROR</span></b><br />";
  &
#125;
  
if &#40;$image_downloads != ""&#41; &#123;
    
echo $lang['field_downloads'&#93;."...";
    
flush&#40;&#41;;
    
$result $site_db->query&#40;"UPDATE ".IMAGES_TABLE." 
                               
SET image_downloads $image_downloads"&#41;;
    
    echo &#40;
$result&#41; ? "<b>OK</b><br />" &#58; "<b><span class=\"marktext\">ERROR</span></b><br />";
  &
#125;
  
if &#40;$image_rating != ""&#41; &#123;
    
echo $lang['field_rating'&#93;."...";
    
flush&#40;&#41;;
    
$image_rating sprintf&#40;"%.2f", intval&#40;$image_rating&#41;&#41;;
    
$result $site_db->query&#40;"UPDATE ".IMAGES_TABLE." 
                               
SET image_rating $image_rating"&#41;;
    
    echo &#40;
$result&#41; ? "<b>OK</b><br />" &#58; "<b><span class=\"marktext\">ERROR</span></b><br />";
  &
#125;
  
if &#40;$image_votes != ""&#41; &#123;
    
echo $lang['field_votes'&#93;."...";
    
flush&#40;&#41;;
    
$result $site_db->query&#40;"UPDATE ".IMAGES_TABLE." 
                               
SET image_votes $image_votes"&#41;;
    
    echo &#40;
$result&#41; ? "<b>OK</b><br />" &#58; "<b><span class=\"marktext\">ERROR</span></b><br />";
  &
#125;
&#125;

if &#40;$action == "resetstats"&#41; &#123;
  
if &#40;$msg != ""&#41; &#123;
    
printf&#40;"<b>%s</b>\n", $msg&#41;;
  
&#125;
  
show_form_header&#40;"stats.php", "updatestats", "form", 1&#41;;
  
show_table_header&#40;$lang['nav_general_stats'&#93;, 2&#41;;
  
show_description_row&#40;$lang['reset_stats_desc'&#93;, 2&#41;;
  
show_table_separator&#40;$lang['nav_categories_edit'&#93;, 2&#41;;
  
show_input_row&#40;$lang['field_hits'&#93;, "cat_hits", "", $textinput_size2&#41;;
  
show_table_separator&#40;$lang['nav_images_edit'&#93;, 2&#41;;
  
show_input_row&#40;$lang['field_hits'&#93;, "image_hits", "", $textinput_size2&#41;;
  
show_input_row&#40;$lang['field_downloads'&#93;, "image_downloads", "", $textinput_size2&#41;;
  
show_input_row&#40;$lang['field_rating'&#93;." &#40;1-".MAX_RATING."&#41;", "image_rating", "", $textinput_size2&#41;;
  
show_input_row&#40;$lang['field_votes'&#93;, "image_votes", "", $textinput_size2&#41;;
  
show_form_footer&#40;$lang['save_changes'&#93;, "", 2&#41;;
&#125;

show_admin_footer&#40;&#41;;
?>