New Files Advanced 1.0

All new Coranto Addons, updates and patches to addons, will be released here...also, get support for addons within!

Moderators: Spunkmeyer, Dale Ray, SrNupsen, Bluetooth, Jackanape

Postby Parahead » Fri Apr 16, 2004 3:23 pm

faithless, a small bugreport...

In the sub NewFiles_Build, after the "# Initialise the hashes."-line, add the UnsortedFiles array to be cleared as well:
Code: Select all
my @UnsortedFiles;

I encountered some strange behaviour when using two NewFiles profiles and started to dig into the code and found that the cause was this. ;-)
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby faithless » Fri Apr 16, 2004 4:01 pm

oh. That would mean we have to do the same for @SortedFiles as well. :oops: Link Updated.
faithless
 
Posts: 1335
Joined: Wed Oct 16, 2002 4:17 pm
Location: Infront of the Computer

Postby Parahead » Fri Apr 16, 2004 4:35 pm

faithless wrote:oh. That would mean we have to do the same for @SortedFiles as well. :oops: Link Updated.
Nah, actually it doesn´t, since the values are not pushed onto the SortedFiles array but instead the hole array is given a value ( "=" instead of "push").
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby faithless » Fri Apr 16, 2004 4:40 pm

Parahead wrote:
faithless wrote:oh. That would mean we have to do the same for @SortedFiles as well. :oops: Link Updated.
Nah, actually it doesn´t, since the values are not pushed onto the SortedFiles array but instead the hole array is given a value ( "=" instead of "push").
I like to localise variables just in case.
faithless
 
Posts: 1335
Joined: Wed Oct 16, 2002 4:17 pm
Location: Infront of the Computer

Postby Parahead » Fri Apr 16, 2004 6:01 pm

faithless wrote:I like to localise variables just in case.
Yeah, true! The moment I hit submit on my last post I remember that I should have added something along the line of "But initilizing the SortedFiles array doesn´t hurt either and is good coding standard..." ;-)
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby Parahead » Sun Jun 20, 2004 1:51 pm

This might be a good feature to add into the next version? The option to have one profile creating multiple outputfiles, one for each subdirectory could come in handy in some cases?
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby faithless » Mon Jun 21, 2004 2:38 am

Ok. KIVed.
faithless
 
Posts: 1335
Joined: Wed Oct 16, 2002 4:17 pm
Location: Infront of the Computer

Postby Parahead » Mon Jun 21, 2004 3:44 pm

faithless wrote:Ok. KIVed.
Sounds good, if I just know what KIV ment... :roll:
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby faithless » Mon Jun 21, 2004 3:47 pm

"Keep in View" or in this case now, "Kept in View"
faithless
 
Posts: 1335
Joined: Wed Oct 16, 2002 4:17 pm
Location: Infront of the Computer

Postby Dale Ray » Tue Mar 15, 2005 8:02 am

The NewsCounter addon does not work with the New Files Advanced profiles. Is there any way to get the number of files in a directory so that you could use it in a style for testing.

I am fooling around with using New Files for a simple picture gallery and to format the thumbs layout it would be useful to know when the last file is being processed.
Dale Ray
User avatar
Dale Ray
 
Posts: 1001
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

Postby Parahead » Wed Mar 16, 2005 5:03 pm

Dale Ray wrote:The NewsCounter addon does not work with the New Files Advanced profiles. Is there any way to get the number of files in a directory so that you could use it in a style for testing.

I am fooling around with using New Files for a simple picture gallery and to format the thumbs layout it would be useful to know when the last file is being processed.
Not tested, but if you open up cra_newgfiles.pl and search for:
Code: Select all
if (@newfiles) {

and after that line put this line:
Code: Select all
$NumberOfFilesInThisProfile = scalar @newfiles;

Then you should be able to use this in your style:
Code: Select all
Total number of files in this profile is: <Field: NumberOfFilesInThisProfile>
Or using the variable to test if it is the last file in the profile, like so:
Code: Select all
<PerlCode>
if(++$Filecounter{$prof} == $NumberOfFilesInThisProfile) {
</PerlCode>
This is the last file in this profile...
</If>

Let me know if it works...
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby Dale Ray » Wed Mar 16, 2005 7:46 pm

Parahead,

Thanks for the reply. I will test this later.

If I get a photo gallery to work I will write up a HowTo.

Thanks
Dale Ray
User avatar
Dale Ray
 
Posts: 1001
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

Postby Gilbert » Sun May 22, 2005 2:14 pm

Small issue. Really more to do with Maginot.

To explain

When deleting a news item as Maginot does not delete the file from the server New Files keep displaying the link.

I am using New Files to display the latest 5 news title irrespective of their profile/catgory
Gilbert
 
Posts: 121
Joined: Tue Jan 09, 2007 10:03 am

Postby SrNupsen » Sun May 22, 2005 8:39 pm

Gilbert wrote:I am using New Files to display the latest 5 news title irrespective of their profile/catgory


Wouldn't you be better off using a profile for that, including the latest 5 news from all categories?

SrNupsen
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby Gilbert » Sun May 22, 2005 9:00 pm

SrNupsen wrote:
Gilbert wrote:I am using New Files to display the latest 5 news title irrespective of their profile/catgory


Wouldn't you be better off using a profile for that, including the latest 5 news from all categories?

SrNupsen


Hmmm.... Never thought about it.

Though, beside creating additional html pages if files of each categories are saved in a particular folder, it could create an issue if each category has a " customised " html look and feel, or am I wrong ?
Gilbert
 
Posts: 121
Joined: Tue Jan 09, 2007 10:03 am

PreviousNext

Return to Addon Release and Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron