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

Pages: [1] 2 3 4 5
1
Discussion & Troubleshooting / Re: Login/logout problem
« on: April 29, 2010, 11:51:01 AM »
V@no, GaYan,
thank you guys!

But the impression that the problem had gone away somewhere this morning. Thank you very much!

: Have you tried different browser or even different computer? Maybe clear cookies in your browser?

This problem had many users of my gallery. Also I tried Opera 10.53 and IE 8. All worked fine on denwer (localhost) and problem was only on the server.
Thank you for hint about cookies, I didn't try it.

: correct the js as well

Thanks, I'll do it.

2
Discussion & Troubleshooting / Login/logout problem
« on: April 28, 2010, 11:53:19 PM »
Hello,

could you help me resolve the problem.
Some days ago I transfered to new shared hosting and yesterday there a problem appeared with login/logout or session (I don't know, i'm nube in sessions field).

Description of problem:

1. Login on index page.
2. Click any new image on index.
3. Click return to index from details.
4. Repeat some times 2-3

As result - I see myself as logouted on a some step (e.g. on index) and logined on some (e.g on another page).
Sometimes the browser exit/run again helps with the problem. In this case I still logined on each page.

Instead 2-4 you can simply reload index a few times after login - and status changes to logout.

Also sometimes it is need more then one click on logout link to real logout.

Could you help me? May be there some wrong server side settings?

Gallery: http://gallery.imagemaster.ru
Login: test
Pass: test

(login link is "Войти" is the top link on left corner)

php (5.2.6):
http://gallery.imagemaster.ru/ phpinfo.php
remove space .................^...........


Server works as mod_apache or Fast_CGI (the problem still in any mode).

.htaccess
Code: [Select]
#php_flag register_globals Off
#php_flag session.use_trans_sid off

SetEnv TZ Europe/Moscow
ErrorDocument 404 /

AddDefaultCharset windows-1251

# Begin search engine friendly links code
RewriteEngine On
#RewriteBase /
RewriteRule ^lightbox\.htm$ lightbox.php?%{QUERY_STRING}
RewriteRule ^lightbox\.([0-9]+)\.htm$ lightbox.php?page=$1&%{QUERY_STRING}

RewriteRule ^search\.htm$ search.php?%{QUERY_STRING}
RewriteRule ^search\.([0-9]+)\.htm$ search.php?page=$1&%{QUERY_STRING}

RewriteRule ^cat\.htm$ categories.php?%{QUERY_STRING}
RewriteRule ^cat([0-9]+)\.([0-9]+)\.htm$ categories.php?cat_id=$1&page=$2&%{QUERY_STRING}
RewriteRule ^cat([0-9]+)\.htm$ categories.php?cat_id=$1&%{QUERY_STRING}

RewriteRule ^img([0-9]+)\.htm$ details.php?image_id=$1&%{QUERY_STRING}
RewriteRule ^img([0-9]+)\.([a-zA-Z0-9]+)\.htm$ details.php?image_id=$1&mode=$2&%{QUERY_STRING}

RewriteRule ^postcard([a-zA-Z0-9]+)\.htm$ postcards.php?postcard_id=$1&%{QUERY_STRING}
RewriteRule ^postcard\.img([0-9]+)\.htm$ postcards.php?image_id=$1&%{QUERY_STRING}

RewriteRule ^author([0-9]+)\.htm$ member.php?action=showprofile&user_id=$1&%{QUERY_STRING}

# End search engine friendly links code

XBitHack full
#SecFilterScanPOST Off

3
V@no,

what you think about following alternatives hacks:

1. Many fields in the query are redundant, most users needs only show a thumbnail with image name. So in SELECT statement  we can leave only "i.image_id, i.cat_id, i.image_name, i.image_media_file, i.image_thumb_file", also we can remove "LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)". It helped me to significant reduce a query time.

2. Alternative way for ORDER BY RAND is to make selection by image creation time. E.g. select some images with "image_date > d", where d is a random date in (min(image_date), max(image_date)).

I use for my index page this code (it's very hardcoded, it's only as example):

Code: [Select]
$starttime = time() - 1133463722 - 2419200; //current date - date of permanent first image - month
$randdate = 1133463722 + mt_rand (1, $starttime);
 

$sql = "SELECT i.image_id, i.cat_id, i.image_name, i.image_media_file, i.image_thumb_file"."
        FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
        WHERE i.image_date > ".$randdate." AND i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")
ORDER BY i.image_date ASC
        LIMIT 1";

4
Mods & Plugins (Releases & Support) / Re: [MOD] Votes saved in DB
« on: April 14, 2010, 08:12:41 PM »
I want that only admin know who voted on picture.

Open details.php, find
Code: [Select]
//--- Voted stats -------------------------------------
and before

Code: [Select]
$site_template->register_vars(array(
insert something like (change YOURNAME to your login)

if ($user_info['user_name'] !="YOURNAME") {
    $voted_list = "Image was rated";
}

5
Installation, Update & Configuration / Re: Time configuration
« on: April 13, 2010, 08:56:17 PM »
Another way is to put in .htaccess something like:

Code: [Select]
SetEnv TZ America/Indianapolis
All timezones:
http://us.php.net/manual/en/timezones.europe.php

6
Try ubuntu LiveCD.

Thanks, Vano.

For Backup i use this plugiin: http://www.4homepages.de/forum/index.php?topic=15209.msg81582#msg81582

Thank you! I'm wondering, that the tar/gzip for 3 Gb of images will work in the shared hosting.

7
Hello,
could you help me, how I can get the backup of my data folder from server (shared hosting) with images if I use Windows.
The problem is there many identical files with a different case, e.g. 1.jpg and 1.JPG. The Windows is case insensitive, but UNIX (server) is not.
I've about 30000 images and I'm wondering, is there any way to make backup? I see only one solution - setup something like Linux under VM, but I not familiar with it. May be exist another way?

Thanks.

8
Mods & Plugins (Requests & Discussions) / Re: Cache tuning
« on: February 15, 2010, 01:58:23 AM »
Up

9
Discussion & Troubleshooting / TUT needs (how caching the part of template)
« on: February 14, 2010, 06:05:20 PM »
Hello,
there are some MODs which are heavy for server when invokes from each page. E.g.
http://www.4homepages.de/forum/index.php?topic=24677.msg145576#msg145576

I've moved the part of this mod from page_header.php to index.php, because it heavy for every page. But I wonder is there a possibility to cache such pieces of code?

Is there any tutorial how to cache a part of template?

Thanks!

10
Mods & Plugins (Releases & Support) / Re: [MOD] Left Gallery QuickList
« on: February 14, 2010, 04:12:14 PM »
Thanks for the MOD,
but there is a problem - it is including in the page_header.php, so for EVERY page the category tree will be created (calculated sizes, queries etc.)
I've noticed some increase of page generating time with this mode.

Is there a way to cache the mod or include it only in home template (I don't display category menu in all pages exclude home page)?

Updated:

As I've categories only in index, I move

Code: [Select]
//-----------------------------------------------------
//--- MOD Left Quicklist -------------------------------
//-----------------------------------------------------
$left_quicklist = get_left_quicklist($cat_id);
$site_template->register_vars(array(
"left_quicklist"   => $left_quicklist,
"lang_left_quicklist" => $lang['left_quicklist']
));
unset($left_quicklist);
// END MOD Left quicklist

from page_header.php to index.php before

Code: [Select]
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------

11
Mods & Plugins (Releases & Support) / Re: [MOD] Paging for comments
« on: February 08, 2010, 02:19:14 PM »
I've question about sorting direction (ACS, DESC), some users wants to ASC, some DESC. Is it possible to allow users decide how sorting comments?

http://www.4homepages.de/forum/index.php?topic=5830.msg58693#msg58693

Das ist ein netter Mod! Nur wie kann man folgendes noch dazu einstellen damit immer die letzten Kommentare sichtbar sind? Also die letzte Kommentarseite des ausgewählten Bildes?

...
I think to change the order from ascending to descending is better, so u see the latest comments always on the first site.

Search
Code: [Select]
$sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq").$additional_sql."
         FROM ".COMMENTS_TABLE." c
         LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = c.user_id)
         WHERE c.image_id = $image_id
         ORDER BY c.comment_date ASC
         LIMIT $offset, $commentperpage";

and replace with
Code: [Select]
$sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq").$additional_sql."
         FROM ".COMMENTS_TABLE." c
         LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = c.user_id)
         WHERE c.image_id = $image_id
         ORDER BY c.comment_date DESC
         LIMIT $offset, $commentperpage";

The only change is the changed order from ASC to DESC.

12
Discussion & Troubleshooting / [Solved] Users can edit only own comments
« on: February 07, 2010, 10:35:48 PM »
Users can edit only own comments in details page of their images.

details.php
Find:

Code: [Select]
      elseif ($is_image_owner) {
        $admin_links .= ($config['user_edit_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=editcomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['edit']."</a>&nbsp;";
        $admin_links .= ($config['user_delete_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=removecomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['delete']."</a>";
      }

Replace string

Code: [Select]
      elseif ($is_image_owner) {
to

Code: [Select]
      elseif ($is_image_owner && $user_info['user_id'] == $comment_user_id) { 

13
Sumale.nin, thank you for hint!
It's a bug in rustynet's Black2 template. The member.html template like this:

Code: [Select]
{if user_loggedout}
    {user_box}
{endif user_loggedout}
{if user_loggedin}
    {lang_control_panel}
    --------------------------------------------------------------------------------
    {if msg}{msg}{endif msg} {content}
{endif user_loggedin}

So the login field and profile info in the one template.

14
Help me with a hint please,

I've 1.7.7 with a many MODs installed and I've notice that the users profiles available only for loggined users. If user is a guest, the login form is showed instead, like this
http://gallery.imagemaster.ru/author3.htm

Could anyone give me a hint, what files must I check for discover the error?

15
Mods & Plugins (Releases & Support) / Re: [MOD] Votes saved in DB
« on: February 06, 2010, 02:00:32 AM »
Hey guys

I already installed the [MOD] Votes saved in DB. I use Option A. I use a table called "voted" to store the image_id, the user_id, vote, and user_IP. The problem is when I delete an image or an entire category, it's ok. 4images delete the records in the images table, but doesn't delete the record in the voted table. How can we repair this?

I agree with it. For now I've deleted more than 25000 rows from 4images_voted table via phpMyAdmin:

Code: [Select]
DELETE
FROM `4images_voted`
WHERE NOT EXISTS
( SELECT *
FROM `4images_images`
WHERE 4images_images.image_id = 4images_voted.image_id
);

DELETE
FROM `4images_voted`
WHERE NOT EXISTS
( SELECT *
FROM `4images_users`
WHERE 4images_users.user_id = 4images_voted.user_id
);

But we need a correction on core delete (image/user) function.

Pages: [1] 2 3 4 5