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

Pages: [1] 2 3 4 5
1
Installation, Update & Configuration / .htaccess/.htpassword ?
« on: June 01, 2008, 12:43:16 PM »
In the FAQ for security, it says the following:

Password protect the Admin Control Panel directories using .htaccess/.htpassword.

How is that accomplished?

2
Discussion & Troubleshooting / [cat_hits} showing wrong..?
« on: May 26, 2008, 09:56:32 PM »
I created a lot of categories with the batch plug-in, and then deleted everything. Then it said I had 0 photos in 192 categories, although I have no categories at all. When I in Admin Control Panel create a new category it gets a very high ID, like 736. I've tried to clear the cache.

What's wrong?

3
Chit Chat / One more question...
« on: May 26, 2008, 05:59:51 PM »
I have one more question:

That plug-in is constructed so that you have to "Click here to continue" for every category that is created. So If I have 400 folders that is supposed to be converted into 400 categories, I have to click it 400 times. Pretty time consuming. I've tried to take it away but haven't managed to get it to work.

Did Jan create it? How do I remove it so that it just converts all folders to categories at once, without having to click and confirm?

4
Chit Chat / Re: Fast-create categories?
« on: May 26, 2008, 05:53:45 PM »
To sort folders that have firstname and lastname by lastname I did this:

Put beneath source code before the function get_dir,


function compare_fullname($a, $b)
{
  $retval = strnatcmp($a[1], $b[1]);
  if(!$retval) return strnatcmp($a[0], $b[0]);
  return $retval;
}


function sortbylastname($folders) {
   $string = array();
   $string2 = array();
   foreach ($folders as $name)  {
      $string[] = explode(" ", $name);
   }

   # sort alphabetically by name
   usort($string, 'compare_fullname');
   
   foreach ($string as $name)  {
      $string2[] = implode(" ", $name);
   }   
   return $string2;
}

*************************

Also, within function get_dir, you have to replace line

sort($folders);

with

$folders = sortbylastname($folders);

5
Chit Chat / Re: Fast-create categories?
« on: May 25, 2008, 03:31:24 PM »
I've tried to change the get_dir function to sort alphabetically by last name, but I get error messages: Can anybody see anything wrong?


function get_dir($dir, $id, $pos = 0) {
  global $a, $b, $file, $dir_array, $dir_parent_array, $id, $id2, $id3, $data_src_path, $thumbnail_options;

  $handle = opendir($dir);
  $folders = array();
  while ($file = @readdir($handle)) {
    if (@is_dir($dir.$file) && !eregi("^\.{1,2}$", $file) && $file != basename($thumbnail_options['subfolder'])) {
      $folders[] = $file;
    }
  }
  @closedir($handle);
   
  $first_name = array();
  $last_name = array();
  $name_temp = array();
  unset($file);
   
   foreach ($folders as $file) {
    $id2 = 0;
    $id3 = 0;
      
      if (substr($file,$id2,1) != ' ') {                                   // This if-statement is supposed to separate
         $first_name[$id2] = substr($file,$id2,1);    // the first and last name.
           $id2++;
           }
         else
           {
           $last_name[$id3] = substr($file,$id3,1);   // This creates the last name
             $id3++;
         }
      $name_temp = array(                                             // Here it's supposed to create an array
         array($first_name, $last_name)                 // of first_name and last_name
         );
   }
   unset($file);
   
   function compare_lastname($a, $b)                                          // This function sorts the array by the last name.
   {
     return strnatcmp($a[1], $b[1]);
   }

   # sort alphabetically by name                                                   // This calls the above function.
   usort($name_temp, 'compare_lastname');
   
   
   $id = 0;                                                                        // This puts the sorted folders back to one string (firstname
   foreach ($name_temp as $file) {                                      // and last name(, separated by a space.
      $folders[$id] =  $name_temp[$id][0] . ' ' . $name_temp[$id][1];   //Is this the right way to put it together?
      $id++;
   }
   unset($file);
      
   $id = 0;
    foreach ($folders as $file) {
    $id++;
    $dir_array[$id] = array(
      "cat_name" => $file,
      "cat_path" => $dir.$file,
      "cat_folder_path" => str_replace($data_src_path."/", "", $dir.$file),
      "parent_id" => $pos
    );
    $dir_parent_array[$pos][] = $id;
    get_dir($dir.$file."/", $id, $id);
  }
  return true;
}

6
Chit Chat / Re: Fast-create categories?
« on: May 22, 2008, 11:18:13 AM »
Exactly what part in the source code does the reading of folders from /MyMap and creates categories based on that? I'm trying to modify this myself.

7
The category drop-down list is great. Is it possible to add after each category how many pictures there are within? (So you don't have to "waste" time and visit a category that is empty.)

For example if it could look like this in the drop-down list: Cars (12)

I've found the function that seems to be: category_dropdown_selfjump

that is defined in page_header.php, but how to modify?

8
Templates & Styles (Requests & Discussions) / comment_user_ip ?
« on: May 21, 2008, 04:48:46 PM »
I'm doing modifications. In my template comment_form.html I want the user's IP address just above the SUBMIT button. I took this code from comment_bit.html:

<a name="comment{comment_id}"></a>
{if comment_user_ip}<b>Your IP:</b> {comment_user_ip}{endif comment_user_ip}<br>
<br>

and put it above the SUBMIT button, but it doesn't work. Have I forgotten some parsing or something?

(I'm not really sure I need that <a name="comment{comment_id}"></a> but I put it there anywhere.)

9
Discussion & Troubleshooting / Re: rss error?
« on: May 21, 2008, 03:46:15 PM »
Or is it supposed to look like that?

RSS is some kind of news feed right?

10
Discussion & Troubleshooting / rss error?
« on: May 21, 2008, 03:45:24 PM »
I have not modified any rss coding at all, but when I press the rss-symbol at the bottom of the page I get a loooong source code in my browser.

Why is that?

11
Thanx. I was actually looking for less information. Sometimes less is more.

The template was thumbnail_bit.html then. :)

12
When I try to remove "Headline" from the Comment form it doesn't appear on the webpage, but when I try to post the comment I get en error message: Please enter a headline.

I removed this:

<tr>
<td width="90"><b>{lang_headline}</b></td>
<td>
<input type="text" name="comment_headline" size="30" value="{comment_headline}" class="commentinput" />
</td>
</tr>

How come I get the error message and where do I fix that?

13
Not that incredible much change, I just want it my way :)

Later... :)

14
Templates & Styles (Requests & Discussions) / Add my own lang_text?
« on: May 21, 2008, 11:21:59 AM »
I want to add my own text, for example:

$lang['headline'] = "Headline";

in /language/main.php.

However, this doesn't seem to work, noting shows up. I've used lang_headline in the source code. I guess somehow the "lang_headline" should somewhere turn into only "headline" and then be sent to main.php?

15
How do I change the "look" of {new_images} ?

For example, if I want to modify the information displayed beneath the photo, such as the username, category etc.?

Can't find how to do it since there's no template for it... some .php perhaps?

Pages: [1] 2 3 4 5