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.


Topics - Joss

Pages: [1]
1
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

2
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.

3
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!

4
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) { 

5
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?

6
Hello,

the ACP index page of my gallery loads server very much. I have > 5000 users, > 17000 images, > 2 Gb of images space.
Often I get "An unexpected error occured. Please try again later." while entering to ACP index page. But another pages in ACP loadings quickly.

So the my question is - can I hack something (remove some queries) in ACP index for resolve this problem? It seems to me there are some statistic queries which take a lot of time. I don't need "Who's online?" and "Top" information, and from "Stats" I need only how many images awaiting validation.
--------


Update: I did it myself. I insert some variables in the top of admin/home.php for tuning displayed info on home page.


Code: [Select]
$show_online_stat = 0;
$show_users_stat = 1;
$show_top_stat = 0;
$show_media_stat = 0;
$show_thumb_stat = 0;
$show_db_stat = 0;

And there is a modified admin/home.php for 1.7.7

7
There is a JavaScript version, but it is not cached by 4images and parsed by search engines.
So here is php version
Demo (in middle of index page): http://gallery.imagemaster.ru/

1. Insert into index.html

Code: [Select]
<?php 
include($_SERVER['DOCUMENT_ROOT']."/rphpbb.php"); 
?>


2. Create rphpbb.php file in root (2 variants with last reply time and without it)

1. with time
Code: [Select]
<?php
$connection 
mysql_connect(localhost,"your_login","your password") or die("Service temporairly unavailable");
$db mysql_select_db("your_db_name",$connection) or die("Service temporairly unavailable");
$sql "select * from phpbb_topics order by topic_last_post_time desc limit 0,12";
$result mysql_query($sql) or die("Service temporairly unavailable");
for(
$x=1;$x<=12;$x++){

    
$row mysql_fetch_array($result);
$time_last_reply date("d.m"$row[topic_last_post_time]);
$time_from_last_reply $time_last_reply;

$minutes_from_last_reply = (int) ((time() - $row[topic_last_post_time])/60);

if ($minutes_from_last_reply 60) {
$time_from_last_reply $minutes_from_last_reply." m.";
}

if ($minutes_from_last_reply >= 60 && $minutes_from_last_reply <= 480) {
$hours_from_last_reply = (int) ($minutes_from_last_reply/60);
$time_from_last_reply $hours_from_last_reply." h.";



    echo 
"[$row[topic_replies_real]]&nbsp;<a href = \"http://www.yourforumdomain.com/viewtopic.php?f=$row[forum_id]&t=$row[topic_id]&view=unread#unread\" target = \"_blank\">$row[topic_title]</a>&nbsp;(".$time_from_last_reply.")<br>";
}
?>


2. w/o time
Code: [Select]
<?php
$connection 
mysql_connect(localhost,"your_login","your password") or die("Service temporairly unavailable");
$db mysql_select_db("your_db_name",$connection) or die("Service temporairly unavailable");
$sql "select * from phpbb_topics order by topic_last_post_time desc limit 0,12";
$result mysql_query($sql) or die("Service temporairly unavailable");
for(
$x=1;$x<=12;$x++){
    
$row mysql_fetch_array($result);
    echo 
"[$row[topic_replies_real]]&nbsp;<a href = \"http://www.yourforumdomain.com/viewtopic.php?f=$row[forum_id]&t=$row[topic_id]&view=unread#unread\" target = \"_blank\">$row[topic_title]</a><br>";
}
?>


3. Change in file the strings:

"your_login"  - to your db forum login
"your password"  - to your forum db password
"your_db_name"   - to your forum db name
www.yourforumdomain.com   - to your forum address

4. In include/constants.php must set 1 in this define:

define('EXEC_PHP_CODE', 1);

5. You can tune the code: 12 last topics displayed now, you can change this constant (change 12 in two places to another values)

8
Mods & Plugins (Requests & Discussions) / Cache tuning
« on: October 26, 2009, 02:53:28 PM »
Hello,  I've some questions about cache 1.7.7,

1. How to purge (invalidate) index page cache or all cache when a new comments, images added? I show last comments on an index page so if someone add a new comment there will no index page updating until cache time is expired.
2. How set different time to different cache categories, e.g. - 1 minute to index, 1 hour to rss and top?

Thanks.

9
Update:
phpbb3 JavaScript solution is here: http://www.4homepages.de/forum/index.php?topic=16972.msg142471#msg142471
phpbb3 PHP solution is here: http://www.4homepages.de/forum/index.php?topic=26170.0



The MOD allows you showing public topics of your phpBB board on your gallery. Author of the MOD is Xpert from http://phpbbguru.net/ .

1. Download, install and configure this MOD (required time is 3-5 minutes)
http://phpbbguru.net/files/mods/recent_topics_1.0.4.zip

2. In home.html of your gallery template folder insert somewere the following line:
Code: [Select]
<script language='JavaScript' type='text/javascript' src='http://your_forum_address/recent.php'></script>
Note: You should change a your_forum_address to your phpBB forum address.

E.g., like this:

Code: [Select]
<table width="100%" border="0" cellspacing="1" cellpadding="1">
   <tr>
       <td align="left" height="20" width="100%">&nbsp;Last forum topics</td>
   </tr>
   <tr>
       <td>
       <script language='JavaScript' type='text/javascript' src='http://forum.imagemaster.ru/recent.php'></script>
       </td>
   <tr>
   <tr>
       <td align="right" height="20" width="100%"> <img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" /><a href="http://forum.imagemaster.ru" target="blank">All forum topics</a>&nbsp;&nbsp;</td>
   </tr>
</table>


The demo is here (near the middle of the page):
http://gallery.imagemaster.ru/


EDIT: .zip attached

10
Hi all,

I've upgraded a gallery from 1.7.1 to 1.7.4 (I've uploaded all new files to server) and set default template as default. But EXIF table isn't shows on detailed page. I've tried a few pictures with EXIF inside. For example:
http://foto.rojdenie.ru/details.php?image_id=45

Is there some requirements for graphic library or PHP version (I've use ImageMagik and PHP 4.4.4.).

Could anyone help me? Thanks!

11
I've use a mode which can move multiple images from one category to another from admin panel, also I can press Edit button and change a category by hand. But the last choice is to slow. I think, it'll be useful MOD - the list of categories on a page with the image which will be shown only for admins. And admin could be simply to choice a wanted category for the image (without redirect to admin panel). What dou you think about it?

12
Chit Chat / Must have - best mods, addons, patches etc.
« on: January 17, 2006, 09:14:11 PM »
Lets talk about the best mods of our gallery, what is necessary to install to the gallery. I think, it will be useful for all, and especially for beginners.
There are my favorite list:

Security Patches:
[1.7 / 1.7.1] Security fix in sessions.php
www.4homepages.de/forum/index.php?topic=8288

[1.7 / 1.7.1] Security fix in search.php and register.php
www.4homepages.de/forum/index.php?topic=10921.0

Patches:
[1.7.1] Conditional tags inside other conditional tags + {ifno ...}{endifno ...}
www.4homepages.de/forum/index.php?topic=7493.0

Mods:                                                                 
[MOD] Universal Paging Class v1.1                                                                 
www.4homepages.de/forum/index.php?topic=6926.0

[MOD] Paging for comments (+ fix for Opera browser)
www.4homepages.de/forum/index.php?topic=5830.0

[MOD] Last comments v1
www.4homepages.de/forum/index.php?topic=7848.0
                                                               
[MOD] All Comments (Alle Kommentare) V.1.0
www.4homepages.de/forum/index.php?topic=10632.0
                                                                   
[Mod] Disable right click on images only                                                                   
www.4homepages.de/forum/index.php?topic=4236.0   
                                                     
[Mod] Latest News and Archive
www.4homepages.de/forum/index.php?topic=5142.0

[Mod] Show user's comments from his profile (+paging change +fix of paging change)
www.4homepages.de/forum/index.php?topic=4131.0

[Mod] Star Rating
www.4homepages.de/forum/index.php?topic=923.0

[MOD] Batch Copy/Move/Edit Images v3.7.2
www.4homepages.de/forum/index.php?topic=6759.0

[Mod] Let visitors to chose how to sort images(date,name,..)
http://www.4homepages.de/forum/index.php?topic=3842.0

Show rating instead of comments
http://www.4homepages.de/forum/index.php?topic=3588.0

Top Images Adapted for Weighted Average & Minimum # Votes for Top 10
http://www.4homepages.de/forum/index.php?topic=8369.0

[MOD] Category Image v1.0.1
www.4homepages.de/forum/index.php?topic=6922.0

[MOD] Votes saved in DB (A version + additional changes)
http://www.4homepages.de/forum/index.php?topic=6123.0

[Mod] User upload limits
http://www.4homepages.de/forum/index.php?topic=3607.0

[MOD] Photo Of The Day
http://www.4homepages.de/forum/index.php?topic=3529.0

[Mod] Toplist altered
http://www.4homepages.de/forum/index.php?topic=2544.0

13
when image uploading? Some users of my forum want to post their images with frames with appointed colors
(white, blue, etc). Is there the possibility to mark background color of an image, or create frame with some color?

Thanks!

Pages: [1]