iionly - I just found a link with advice (including yours) for changing server timezone in Elgg. https://elgg.org/discussion/view/2412154/how-do-i-change-the-time-zone-settings
Am wondering, if I make this script change will it effect the one album created successfilly since the server change (UTC)? Also, am I right in thinking it will not affect entries made prior to server change (UTC - ?
To be honest, I can say for sure if the images of the newly created album will show or not after changing the timezone. My guess is, yes, as I think the real cause of the images not showing (actually any kind of files of the affected users not found) is the <day> part in the path to the users' data:
/path/to/datadirectory/<year>/<month>/<day>/<user_guid>image/<album_guid>
These (sub)directories are created with the timestamp of the account creation taken into account. And the <day> can be different due to the timeshift of different timezones. Afterwards on accessing any files again Elgg again takes the timezone / timeshift currently used into account when determine the path the files are to be found. This part can fail when the timezone has changed.
My suggestion: just try setting the timezone to the timezone used on the old server either in Elgg's .htaccess or in engine/settings.php as soon as possible. The crucial point isn't necessarily the one new album but rather the old albums and profile pictures: will these show up again? If yes, you might lose one new album. But I think it's much easier to fix that (upload again) as compared to trying to get all the old stuff showing up again with different users involved. Also, trying as soon as possible is important as you might get a problem with any newly created accounts now with the new timezone in effect once you return to the old timezone.
Just ask the support of your webhoster about the name of the timezone used on the old server and the add either a line in the <IfModule mod_php5.c> block in .htaccess like
php_value date.timezone 'UTC'
with the timezone name you were told instead of UTC. Or add a line like
date_default_timezone_set('UTC');
in engine/settings.php before the line
global $CONFIG;
Again, enter the timezone name actually been used on your old server.
Eureka - it worked! I entered: date_default_timezone_set('America/Montreal'); in engine/settings.php and the missing images now display correctly. Also, the album created post server move and its comments and the two new user registrations have not been disturbed.
Once again I'm most grateful to you for getting my site working again. I'll doubtless be upgrading later this year and hope you guys hang together (have been reading some of the debate!). Although complex for a non coder like me, I have found Elgg to be consistently highly stable, flexible and secure and look forward to installing version 2.3.
I've just tried it myself on Elgg 1.12 to see if I can reproduce the issue. But everything looks fine for me and works. Which version of Tidypics are you using? Latest version recommended for Elgg 1.12? Latest version of Elgg 1.12? An earlier version of Tidypics contained a version of the HTML5 uploader that could fail to work on some browsers. But the current latest available version of Tidypics should no longer have this issue. Have you tried with another browser to see if the problem is browser-specific?
Could it be a conflict with another 3rd party plugin used on your site resulting in the problem? Could you test by disabling other 3rd party plugins (including any theme plugin) temporarily to find out if the problem is gone then?
It looks to me similar to an issue that occured on Elgg 2.2.0 due to a version of jquery-ui bundled in Elgg core that were not fully backward compatible with the version used before. The HTML5 uploader of Tidypics wasn't fully working with this version. But it was only the icons used within the uploader not showing up correctly (while the uploading of images still worked). This issue is fixed in Elgg 2.2.1 now. But this problem should occur in Elgg 1.12 because it comes with an older version of jquery-ui not causing this problem. But maybe one of the 3rd party plugins you have installed also has the jquery / jquery-ui libs bundled in a newer version than Elgg itself and this might cause the trouble then with Tidypics.
thanks for the reply.
you are right - it's really to the theme (time theme) and accurs only when this theme is activated. but it's not a big thing. we will reduce the uploading capacity anyway to just a few images so that we can use the non-HTML5 uploader.
Well I managed to remove the images from the query editing /tidypics/resources/tidypics/lists/siteimagesall.php eby doing this:
// grab the html to display the most recent images
$result = elgg_list_entities(array(
'type' => 'object',
'subtype' => 'image',
'owner_guid' => NULL,
'wheres'=>'e.guid NOT IN(SELECT entity_guid FROM elgg_metadata WHERE value_id IN(406))',
'limit' => $limit,
'offset' => $offset,
'full_view' => false,
'list_type' => 'gallery',
'gallery_class' => 'tidypics-gallery'
));
Where "406" is the ID of the tag I want picture to not have. Hope someone finds this useful =)
Now I only need to figure out how to add the new tab with the query only showing these tags.
I can't provide you with the ready-to-use code for that (no time at the moment to full code that all) but only some hints that might be useful.
If you haven't seen it yet you might want to check out http://reference.elgg.org/engine_2lib_2metadata_8php.html#aec4b6f0b9565e3554acb9b39ef34a2ac for an example of a where clause to exclude certain entries from a query (not containing a certain metadata). It's similar to what you have come up with but maybe it works even better.
Regarding the additional tab you would have to add the page/view code to be used for this tab, add an entry to Tidypics' pagehandler for this new page and you will have to override the default filter (filter menu is the tabs selection) to add your additional tab. As an example for adding a tab you can take a look into the code of my izap_videos plugin that adds a "Favorite" tab in addition to the default tabs. For the other modifications I can only suggest to look into the code of the Tidypics plugin to understand what is necessary for the creation of the additional tab.
For fetching the images with a specific tab you might need to add some custom join/where clauses. Maybe it helps to look into the code of the elgg_get_tabs() function in engine/lib/tags.php. Using elgg_get_tabs might also work to get an array of image entries that have the desired tag. Though you would have to deal with creating the html output on your own when using elgg_get_tags() whereas Elgg already deals with creating the ready-to-use output when using some elgg_list_*() function. I don't know if you can use elgg_list_entities_from_metadata() without some custom join/where clauses as the tags are not saved as separate metadata entries but instead all tags belonging to an entity are saved as a single metadata (comma separated string with the tag values).
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.