Posts Tagged ‘joomla’

A special photo gallery

Sunday, October 11th, 2009

I feel like I’m going mad. Ever since I started putting my stuff on the net I found that existing web software solutions did not provide what I need. Not even the commercial ones.
Like now, here I am, again, facing my 20k+ photos and trying yet again to manage them using gallery2. But I have a very special need when it comes to photos:
– some photos I don’t want nobody to see. so they’re private
– others, only a few people can see
– others, just a few group of people
– others must be deleted
– and finally, the rest can be seen by the wide public

now, in order to easily support this, I’ve made 5 albums:
– 1 that contains all unsorted photos and which is totally private
– 1 which is my private album
– 1 that is totally public
– 1 that is only for family
– 1 that is for family and friends only

now, when I go into sorting the photos, I need to create sub-albums in most of the main albums and then:
– go over all photos in the managed album and delete what is not needed
– again go over all (remaining) photos in that album and move the needed one to my public
– again go over all (remaining) photos in that album and move the needed one to family only
– again go over all (remaining) photos in that album and move the needed one to family and friends
– move all remaining photos to my private album

so basically I am iterating the photos like 3 to 5 times. It is ANNOYING.

But there is another annoying part. Imagine you’re a family member. That means you have access to 3 albums that contain *related* photos. now that sucks.

The alternative for this is to keep all photos in once place, BUT, manually edit each and every single photos permissions to suit the restrictions on it. 20.000. photos. Twenty THOUSAND photos. If it takes 1 minute per photo, this equals a total of almost 14 continuous DAYS. to be more realistic, using this technique and say 3 hours per day, it means I’d be done in about 111 days. almost 4 months.

It’s a killer because I don’t have 3 hours every single day for this task.

which means I will be writing my own gallery software most likely based on joomla 😀

Cheers.

Related posts

JOOMSUITE 1.4.5: how to add SEF to file downloads [UPDATE]

Monday, October 5th, 2009

This is an update for http://blog.ciuly.com/website/joomsuite-how-to-add-sef-to-file-downloads/ which is valid for joomsuite 1.4.0

You need to edit 3 files and add url rewrite rules.
/components/com_resource/controller.php:373 (download function)

// Ciuly – file SEF
$fn = basename($res->field_value);
if (JRequest::getInt(‘timestamp’)==1){
$a = explode(‘_’, $fn, 2);
$fn = $a[1];
}
if($browser==’IE’) {
header(‘Content-Disposition: attachment; filename=”‘.$fn.'”‘);
header(‘Cache-Control: must-revalidate, post-check=0, pre-check=0’);
header(‘Pragma: public’);
} else {
header(‘Content-Disposition: attachment; filename=”‘.$fn.'”‘);
header(‘Cache-Control: no-cache, must-revalidate’);
header(‘Pragma: no-cache’);
}

./components/com_resource/controller.php:495 (download2 function, after adding above code)

// Ciuly – file SEF
$fn = basename($res->field_value);
if (JRequest::getInt(‘timestamp’)==1){
$a = explode(‘_’, $fn, 2);
$fn = $a[1];
}
if($browser==’IE’) {
header(‘Content-Disposition: attachment; filename=”‘.$fn.'”‘);
header(‘Cache-Control: must-revalidate, post-check=0, pre-check=0’);
header(‘Pragma: public’);
} else {
header(‘Content-Disposition: attachment; filename=”‘.$fn.'”‘);
header(‘Cache-Control: no-cache, must-revalidate’);
header(‘Pragma: no-cache’);
}

./components/com_resource/controllers/article.php:855 (download_attachment function)

// Ciuly – file SEF
$fn = basename($comment->attachmente);
if (JRequest::getInt(‘timestamp’)){
$a = explode(‘_’, $fn, 2);
$fn = $a[1];
}
if($browser==’IE’) {
header(‘Content-Disposition: attachment; filename=”‘.$fn.'”‘);
header(‘Cache-Control: must-revalidate, post-check=0, pre-check=0’);
header(‘Pragma: public’);
} else {
header(‘Content-Disposition: attachment; filename=”‘.$fn.'”‘);
header(‘Cache-Control: no-cache, must-revalidate’);
header(‘Pragma: no-cache’);
}

./plugins/joomsuite_content_fields/file.php:227 (onRenderFieldValue function)
if($params->get(‘show_name’))
{
// Ciuly – make it SEF
if (JROUTER_MODE_SEF)
$download = JURI::base().”download.php/$field->id/”;

$label = basename($field->field_value);
// Ciuly – remove timestamp from display
if ($params->get(‘attach’)){
$a = explode(‘_’, $label, 2);
$label = $a[1];
if (JROUTER_MODE_SEF)
$download = $download . “1/”;
else
$download = $download . “&timestamp=1”;
} else
if (JROUTER_MODE_SEF)
$download = $download . “0/”;
if (JROUTER_MODE_SEF)
$download = $download . $label;
}
else {
$label = $field->title;
}

and finally, url rewrite:
RewriteEngine on
RewriteRule ^/download.php/([0-9]+)/([0-1])/.*$ /index2.php?option=com_resource&task=download&no_html=1&file=$1&timestamp=$2

Related posts

Problem with article file display fixed

Monday, October 5th, 2009

I managed to find and fix the problem that prevented the files from being displayed in the articles on my site.
Long story short, everything should be back to normal now.

Related posts

Joomla issue with articles not showing partially fixed.

Monday, October 5th, 2009

Ever since I switched my site to joomla, my articles were not showing to the public, only to registered users.
I was informed about this issue about a week ago or so. Very late but I’m glad I was informed about it eventually.
So I logged a bug with joomsuite resources (which is the component that actually manages the articles) and I finally got the solution by upgrading to the latest version of that component.
Right now, the articles are showing, the text is there, but the files are not shown. I hope to get this fixed ASAP.

Sorry for the trouble for those who were expecting things to be there. This also got me loose a few rankings in google. Stupid thing.

Related posts

JOOMSUITE: how to add SEF to file downloads

Sunday, August 23rd, 2009

I finally managed to finish my SEF-related hacks on joomsuite for joomla in order to add SEF url support to the filw downloads.
You need to edit 3 files and add url rewrite rules.
/components/com_resource/controller.php:335 (download function)

$fn = basename($res->field_value);
if (JRequest::getInt('timestamp')==1){
  $a = explode('_', $fn, 2);
  $fn = $a[1];
}
if($browser=='IE') {
  header('Content-Disposition: attachment; filename="'.$fn.'"');
  header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
  header('Pragma: public');
} else {
  header('Content-Disposition: attachment; filename="'.$fn.'"');
  header('Cache-Control: no-cache, must-revalidate');
  header('Pragma: no-cache');
}

./components/com_resource/controller.php:450 (download2 function, after adding above code)

$fn = basename($res->field_value);
if (JRequest::getInt('timestamp')==1){
  $a = explode('_', $fn, 2);
  $fn = $a[1];
}
if($browser=='IE') {
  header('Content-Disposition: attachment; filename="'.$fn.'"');
  header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
  header('Pragma: public');
} else {
  header('Content-Disposition: attachment; filename="'.$fn.'"');
  header('Cache-Control: no-cache, must-revalidate');
  header('Pragma: no-cache');
}

./components/com_resource/controllers/article.php:778 (download_attachment function)

$fn = basename($comment->attachmente);
if (JRequest::getInt('timestamp')){
  $a = explode('_', $fn, 2);
  $fn = $a[1];
}
if($browser=='IE') {
  header('Content-Disposition: attachment; filename="'.$fn.'"');
  header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
  header('Pragma: public');
} else {
  header('Content-Disposition: attachment; filename="'.$fn.'"');
  header('Cache-Control: no-cache, must-revalidate');
  header('Pragma: no-cache');
}

./plugins/joomsuite_content_fields/file.php:179 (onRenderFieldValue function)

if($params->get('show_name'))
{
  // Ciuly - make it SEF
  if (JROUTER_MODE_SEF)
    $download = JURI::base()."download.php/$field->id/";

  $label = basename($field->field_value);
  // Ciuly - remove timestamp from display
  if ($params->get('attach')){
    $a = explode('_', $label, 2);
    $label = $a[1];
    if (JROUTER_MODE_SEF)
      $download = $download . "1/";
    else
      $download = $download . "×tamp=1";
  } else
    if (JROUTER_MODE_SEF)
      $download = $download . "0/";
  if (JROUTER_MODE_SEF)
    $download = $download . $label;
}
else {
  $label = $field->title;
}

and finally, url rewrite:

    RewriteEngine on
    RewriteRule ^/download.php/([0-9]+)/([0-1])/.*$ /index2.php?option=com_resource&task=download&no_html=1&file=$1×tamp=$2

Related posts

Site advertising their security component obviously got hacked

Saturday, July 4th, 2009

Joomsuite hacked

Joomsuite hacked

Jomsuite has a security component for joomla, named Defender. It is advertised as the best (and if my memory servers me correctly, the only) security option for joomla sites.
You can see in the attached screenshot how good this component is.
Their video tutorial on the subject is here: http://joomsuite.com/index.php?option=com_resource&controller=article&article=5678&category_id=150&Itemid=135
well, it will be available once they solve their security hole 🙂

Related posts

Started actual joomla migration

Tuesday, June 30th, 2009

Today I started the actual migration of the Delphi Section.
I migrated most of the articles and files but there is still left the UI and WMI articles and some non-article files
Because the site is hand made I cannot write a script to do the migration which is why I am doing it manually and thus it will take some time.
After the Delphi section there are still some other sections that need to be migrated before I will go live.
And part of the migration is to set up 301 redirects for each file. Now this is going to be a real pain.

Related posts

Migrating your site to joomla, part 2

Monday, June 29th, 2009

Following up on http://blog.ciuly.com/website/how-to-actually-migrate-your-site-to-joomla/

I found a nice extension to do image only menus:  http://extensions.joomla.org/extensions/structure-&-navigation/menu-systems/image-menus/4855/details

as for multilevel categories, I am using joomresources:  http://joomsuite.com/index.php?option=com_resource&view=article&article=16&Itemid=12

Related posts

How to actually migrate your site to joomla

Thursday, June 25th, 2009

I decide a while ago that I need to change my attitude, lose my dream of creating a CMS in C interfacing as CGI/SSI and get my site out nice and clean like everybody else.

So after comparing reviews and recommendations, I got stuck with joomla.

Now, I don’t know about you technical guys, but I find joomla very … weak. For one, it does not support sub-categories. you have a section and a category and that’s about it. In my case, I have a lot o sub-categories. So this called for a plugin (not yet installed).

What really pissed me of is that my main page (now) has a very nice image-only horizontal and a vertical menu. I used gimp to create the images which look very nice compared to what my site actually looks like 🙂 So I spent the ENTIRE day trying to figure out how in the name of God I can create an image only menu in joompla. Fact is, I tried a lot of stuff, including the core menu functions, nothing worked. I even installed a plugin called simplelists but to no avail.

So, sinceextensions are slowing things down and complicating everything, I decided todrop that, especially sice somebody on te joomla forum said that the core supports this thing (read more here: http://forum.joomla.org/viewtopic.php?f=304&t=262138&p=1744717#p1744717 )

As of this writing, that guy has not yet replied to my inquiry, BUT, being a genius that I am ( 😀 ), I discovered something very amazing: RAW Html module. Yeah, I get to place whatever html code I want wherever I want it. This is pretty neat because I just copy-pasted my menu code andvoila, it’s up and running. It’s that simple.

Whoe the hell need extensions andstuff when you can have your own custom html wherever?! You have some html/js/css code you need to migrate and there is no apparent way to do it? Raw html.

Who said life is not easy? 🙂 All we need now is multilevel categories and I could say that all is ok.

Related posts

Joomla ftp layer configuration

Tuesday, June 23rd, 2009

As many, I was also having problems with the ftp layer configuration at step 5, getting

The FTP settings are not valid or your FTP server is not compatible with Joomla!: The function “STOR” failed.

I tried most of the suggestions in some of the topic from the joomla forum, but to no avail. Including but not limited to iptables configuration, ftp configurations, etc. Finally, I figured to chown the files and folders to the ftp user. That solved my problem.

Related posts