Welcome, Guest. Please login or register.
March 21, 2010, 06:57:57 PM

Login with username, password and session length
Search:     Advanced search
WB 2.8.1 veröffentlicht!
Download und weitere Informationen gibt es hier .
110610 Posts in 15976 Topics by 9316 Members
Latest Member: melaniejohnson54
* Home Help Search Login Register
+  WebsiteBaker Community Forum
|-+  English
| |-+  Modules (Moderators: Argos, BerndJM)
| | |-+  Aggregator
Pages: [1] 2 3 Go Down Print
Author Topic: Aggregator  (Read 14543 times)
ruebenwurzel
Leaders Team
*****
Offline Offline

Posts: 7211


Keep on Rockin


WWW
« on: May 15, 2007, 11:45:15 AM »

Hello,

icouto developed an new Modul called "Aggregator". What does this modul do? Here is the readme.txt wich comes with this modul:

Quote
--------------------------------------------------------------------------------------------------------
 Module Name: AGGREGATOR
--------------------------------------------------------------------------------------------------------
 This is a page(/section) module, that automatically generates a 'list' or 'catalogue'
 of its child pages. The user specifies what information from the pages should be displayed in the list.
 
 Options include:
   + display page title
   + display a 'summary', which is extracted from the page's contents
     (based on an html tag (with optional + class, + id) specified by the user)

 The user can also get 'Aggregator' to search for the first 'img' tag on each page,
 and create an automatic thumbnail of the image, which appears in the listing.

 CSS classes for list items can be specified, so user can easily format the appearance and layout
 of items in their own stylesheet.
--------------------------------------------------------------------------------------------------------

Aggregator can have any page as a child, including other Aggregators, allowing the user to build a nested hierarchy, if needed.
Aggregator can be used to build fully customised picture galleries, news or blog pages, catalogues, listings, and much more.
As each Aggregator child page is a full page in its own right, the 'Search' function of WB works perfectly with it:
search results list the individual pages where the text is found - unlike searching for an article in the current
'news' add-on, which just returns the news page itself. Individual child pages also get their own listing in search engines,
and users can define overriding keywords and page description for each.

Have fun
Igor de Oliveira Couto (icouto)


/*
Copyright (C) 2007, Pixel Media Pty. Ltd.
http://www.pixelmedia.com.au
admin@pixelmedia.com.au

This module is free software.
You can redistribute it and/or modify it
under the terms of the GNU General Public License
 – version 2 or later, as published by the Free Software Foundation:
http://www.gnu.org/licenses/gpl.html.

This module is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
*/   

So i think this is another cool modul wich i hope got a lot of friends here. Attached you find an already stable version 1.20. This version comes with EN and a DE language file. Please test it and if there are no issues we put it as soon as possible to the addons Page. We also searching for some translators for to add other languages to this modul too.

Thanks Icouto for your work.

Matthias

Edit:
Removed attachement, see for newer version some posts below
« Last Edit: May 20, 2007, 09:04:53 AM by ruebenwurzel » Logged

You search for help, please look here: Help-Page
You search for Modules, Templates or Languages, please look here: Addons-Page
doc

Offline Offline

Posts: 3581


« Reply #1 on: May 15, 2007, 05:32:44 PM »

Hello,

another nice feature of the aggreator module is to create thumbnails of the first image found on each child page. By the use of aggregator, you could easily add a album preview for e.g. the image gallery module. Imagine a file menu structure similar to the one shown below:

Gallery (module type:=aggregator)
  o Gallery 1 (module type:=image gallery)
  o Gallery 2 (module type:=image gallery)
  o Gallery 3 (module type:=image gallery)

You can set up aggregator to show a thumbnail of the first image found on each child page (Gallery 1-3). Clicking on the image redirects you to the corresponding album.

Regards Christian
Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 5561


WWW
« Reply #2 on: May 15, 2007, 07:39:22 PM »

It is a cool module. You are having a product showcase ... great. No need to manually create a product overview page ... use this module. Thanks icouto.

cheers

Klaus
Logged

http://www.weitzel.biz
PM has been disabled
Vincent

Offline Offline

Posts: 316


WWW
« Reply #3 on: May 15, 2007, 08:53:05 PM »

Great contribution! I don't know exactly when I'd use it, but it seems like a powerful addon to WB.
Well done, Icouto.

Vincent
Logged
colboy

Offline Offline

Posts: 4


« Reply #4 on: May 16, 2007, 07:37:38 AM »

I'm playing with the Aggregator, to possibly set up as a hierarchy of products. How do I prevent the children of Aggregator appearing on my main menu at the top of the screen?

Colin
Logged
doc

Offline Offline

Posts: 3581


« Reply #5 on: May 16, 2007, 07:41:56 AM »

@collins:
Icouto is working on an update wich allows to extract information from child pages with the visibility hidden. Simply drop him a PM and ask for the status.

Regards Christian
Logged
icouto

Offline Offline

Posts: 119


« Reply #6 on: May 18, 2007, 10:09:32 AM »

Here is version 1.3 of Aggregator.

I thank everyone in advance for all your help and feedback, and hope that Aggregator will prove just as useful to you as it has been to me.

The new version has some improvements (it now has the capacity to list child pages with the visibility set to 'hidden', and remove html markup from the item summary). You will also find a (basic) built-in help/guide to the module's preferences - right now, unfortunately, only in English.

If you are updating from an older version:

1) overwrite all your older files with the new ones from version 1.3
2) run the 'update.php' script straight away (you just need to access it once by typing its url in your browser)

Please do let us know of any bugs or problems you find!

Enjoy!  smiley
« Last Edit: May 20, 2007, 10:58:31 AM by icouto » Logged
ruebenwurzel
Leaders Team
*****
Offline Offline

Posts: 7211


Keep on Rockin


WWW
« Reply #7 on: May 18, 2007, 01:23:42 PM »

Hello Igor,

thanks for this new version. One hint, if you name the update.php upgrade.php all users of WB 2.6.5 don't need to run this script manually, it will be automaticly called if they simple install the new version over the old one.

Replacing files via ftp on a modul wich was installed via Wb admin is in the most cases not possible because of different file ownerships.

Matthias
Logged

You search for help, please look here: Help-Page
You search for Modules, Templates or Languages, please look here: Addons-Page
Mesum

Offline Offline

Posts: 19


I want to make history.


WWW
« Reply #8 on: May 18, 2007, 06:12:10 PM »

Hello friends, does anyone have a demo or it is something for the backend?
Logged

DGEC

Offline Offline

Posts: 382


WWW
« Reply #9 on: May 18, 2007, 10:30:59 PM »

thanks for this new version. One hint, if you name the update.php upgrade.php all users of WB 2.6.5 don't need to run this script manually, it will be automaticly called if they simple install the new version over the old one.

I tried doing that, and it gave me errors.
Browsing to the file still worked though.

One thing that would be good is a text reading "page" - I couldn't figure out why the "one" was always appearing at the top of the page.  rolleyes
Maybe even make that automatic - if page=1, you don't need it. And add a class for it, it just reads <span> right now.

One note - if you use the image thumbnails: the pictures need to have the same aspect ratio or your aggregate page will be staggered vertically, at this point - I.e. it doesn't handle differences in portrait and landscape cleanly. It's because the image and the text are both in the same cell.

I think this would best be fixed by either creative adjustment of the thrumbnail generation or in the module, user can't do it as far as I can tell), or having the picture and the description on separate table rows.  Also module change required. 

Preferably you could generate an alpha-transparent background (ok, not for JPG, but...) or maybe choose your desired background/frame colour/image and centre the thumbnail on that.

A CSS guru might be able to set the image to align to the top, and the text to the bottom of the cell, but I think you'd have to set an absolute vertical height of the cell or row as well - which appears to be a problematic issue according to my reading on the subject.
Logged
icouto

Offline Offline

Posts: 119


« Reply #10 on: May 19, 2007, 01:35:33 AM »

@DGEC: thank you for your feedback!

About the error you received after changing the 'update' file to 'upgrade', do you remember what the error message was? - that may help me debug it!

About the '1' appearing at the top of the page, hehehehe, you are not the only one who was confused about that. I did not want to place any text there, because it just creates an extra string that has to be translated afterwards. The numbers are each placed in an individual 'span' element, inside a hyperlink, which can be easily styled in CSS to look as a 'navigation menu', if you wish to do so. Nevertheless, to avoid confusion, perhaps I should make the page browsers hidden by default. That way, only people who need the functionality will search for it, and will have to explicitly turn it on. Yep.

About the 'vertical staggering', caused by thumbnails of different proportion: hmmm, I see what you mean.

I have tried to keep the generated code as simple as possible, with as few html elements as possible being used. I have managed to create both a 'list' style aggregator (1 item per line), as well as a 'gallery' style aggregator (3 items per line), both containing thumbnails of different proportions, without this scattered effect - and you do not have to be a CSS 'guru', trust me! smiley

The trick that I used was quite simple - here it is:

Each item in the Aggregator list is made up of:

Code:
<a>
    <img>
    <h3>
    <p>
</a>

Now, when styling by CSS, remember that you do not know exactly what size/proportion the IMG element is going to be - and you cannot control it. You do, however, know what the MAXIMUM width (and height) of that image will be. Knowing that, and also being able to control the width of the <h3> and the <p> elements, you can ensure that all your elements will take up the same amount of space, and align perfectly. Let's say, for instance, that I've set the maximum thumbnail size to be '80' (pixels):

1) for the 'list' view (1 item per line), I 'float' the image to the left, then set the width of both <h3> and <p> elements to '350' (works for my layout, but may vary in yours). Now here is the trick: I then set a 'margin-left' for both <h3> and <p> of about 90 pixels (to give a little distance between the picture and the text). All now aligns perfectly.

2) for the 'gallery' view, I set the 'a' to have centred text. I then set the <h3> and <p> elements to a width of about 140 (good for my specific layout, but any number will do, so long as it is higher than the thumbnail's maximum). It all aligns.

The secret, therefore, is to control the width and margin of the <h3> and <p> elements, not the image!

Try these solutions, and let us know how it turns out for you! smiley

« Last Edit: May 19, 2007, 01:40:21 AM by icouto » Logged
icouto

Offline Offline

Posts: 119


« Reply #11 on: May 19, 2007, 02:13:31 AM »

@Matthias: thank you for the tip about 'upgrade.php'!

I've changed the file's name, and debugged the problem reported by DGEC - at the beginning of the file, the framework functions were being called by "require" instead of "require_once", and therefore causing an error. I've changed it, and tried it myself - installing over a 1.2 version - and it goes perfectly.

I will wait on the German translations before releasing 1.3.1.

In the meantime, would anyone like to submit translations for any other languages? - all welcome!
Logged
ruebenwurzel
Leaders Team
*****
Offline Offline

Posts: 7211


Keep on Rockin


WWW
« Reply #12 on: May 19, 2007, 10:06:23 AM »

Hello,

attached the german language file.

Thanks for your work.

Matthias
Logged

You search for help, please look here: Help-Page
You search for Modules, Templates or Languages, please look here: Addons-Page
icouto

Offline Offline

Posts: 119


« Reply #13 on: May 20, 2007, 02:49:11 AM »

Here is version 1.3.1 of Aggregator, with a new German translation.

Enjoy!
« Last Edit: May 20, 2007, 10:59:11 AM by icouto » Logged
Eki
Documentation Team
******
Offline Offline

Posts: 108



WWW
« Reply #14 on: May 20, 2007, 09:16:21 AM »

Have been trying the module...to me it looks very useful for using it on my own webpage. It would have been very nice though to have a summary build up from the meta-tag (content) automatically. Maybe it is already possible, but I just can't figure out how to.
Logged
ruebenwurzel
Leaders Team
*****
Offline Offline

Posts: 7211


Keep on Rockin


WWW
« Reply #15 on: May 20, 2007, 10:43:25 AM »

@icouto

added version 1.3.1 to the addons page adn make the download visible. Removed a few lines of the description to keep the cooporate design to the other downloads. As soon as we switch to the new  (multilingual) download page we have the possibility to add more descriptions and preview images.

Thanks for your work.

Matthias

P.S.
Can you remove the older versions in the posts above except the last actually version. Thanks
Logged

You search for help, please look here: Help-Page
You search for Modules, Templates or Languages, please look here: Addons-Page
icouto

Offline Offline

Posts: 119


« Reply #16 on: May 20, 2007, 11:05:38 AM »

@Eki: I apologise in advance, if I did not understand what you are trying to do. Here are some quick tips that may help:

1) Aggregator can extract the summary of a page based on any html element present in the CONTENT of the page (content that the user adds via modules/sections in a page).

2) Aggregator can extract the summary of any HTML element present in the content - you specify HOW Aggregator can pick which element is the 'summary'. You can identify the 'summary' by html tag, by style class (or a combination of tag + style class), or even directly by ID.

So, the trick is, to put whatever 'summary' you want to have somewhere inside the content of the page, and clearly identify that 'summary' with a special html tag (like 'address'), a class, or an id.

I hope this helps!
Logged
Panther

Offline Offline

Posts: 168



WWW
« Reply #17 on: May 20, 2007, 07:00:20 PM »

I'm building a site "about WB" to allow clients to preview the different modules/features.

When I tried the aggregator, I am getting division by zero errors for listing some child pages.

I'm trying to get it to pull from the P tag since each page about the module starts with a paragraph summary.

And even on the ones it builds without division errors, it is not picking up that first paragraph.

Any ideas?

I took it down for now because I have a client supposed to be looking at the site this weekend, but can try setting up another instance if someone wants/needs to take a look at it.
Logged
Eki
Documentation Team
******
Offline Offline

Posts: 108



WWW
« Reply #18 on: May 20, 2007, 07:11:39 PM »

@icouto:

I am very sorry as I understand that I have to rephrase my question.

When adding a new page, someone can add a description of that page in the settings of that page. This will be stored in the database and filled in automatically by WB into the META tag:

Code:
<meta name="description" content="<?php page_description(); ?>">

It would be very nice if this could be filled in by an option. Maybe it is already possible, but I am not sure as you stated that it can only be any html-element in the content of the page, so not the HEAD section of the page.
« Last Edit: May 20, 2007, 10:34:43 PM by Eki » Logged
icouto

Offline Offline

Posts: 119


« Reply #19 on: May 21, 2007, 03:09:22 AM »

@Panther: oooooooh, that doesn't sound good! Please, do give us some more details, or if you have the time, set up a test site with the problem, so that I can have a look at it, and try to troubleshoot it for you.

@Eki: you are right - Aggregator cannot pick up the 'page/website description' automatically, because it is not part of the 'content' of the page. Right now, the only alternative I can suggest, is that you perhaps COPY the description into the page itself somewhere, so that Aggregator can pick it up.

If more people think that using the PAGE(/WEBSITE) DESCRIPTION as a summary is a good idea, I can certainly add that to a future version.  smiley
Logged
Panther

Offline Offline

Posts: 168



WWW
« Reply #20 on: May 21, 2007, 05:18:46 AM »

http://baker.mnpages.com/pages/add-on-modules/page-type.php

That's the page I first tried the Aggregator on, I've been trying to get it to list the various pages under. All of the "broken" ones have been removed except one... the site map was showing up, but when I added guestbook, things broke.

Additionally, I can't get the ones it shows to display the summary. I've tried having it pick up the P tag and also added the class=summary and it doesn't pick it up.

Even worse... I had it working on this page - http://baker.mnpages.com/pages/add-on-modules/page-type.php - and it was working fine... until I added the aggregator to the page-type page.

Things are still showing up on the Core Module page, except it's not picking up all the text from the first paragraph.

I'm more than a bit confused. :>
Logged
icouto

Offline Offline

Posts: 119


« Reply #21 on: May 21, 2007, 05:55:13 AM »

@Panther, thank you for setting up that test page for me.

The 2 lines that are giving the 'division by 0 error', are lines where there is a % (mod) operation involving the number of items per line in the Aggregator. Can you confirm, that in your Aggregator settings, your 'number of items per line' is set to '1' or higher? Actually, it may be helpful if you could post ALL your settings here, so I can try to reproduce the problem, too!

This problem should not be happening, as if a user tries to use a number < 1 in 'items per line', it should disregard that, and use '1' instead - but perhaps my checking code is buggy!
Logged
icouto

Offline Offline

Posts: 119


« Reply #22 on: May 21, 2007, 10:53:10 AM »

@Eki, I hope you are still checking this forum. I think I may have found a way to get Aggregator to automatically get the page description for you. I haven't tried it, but it should work.

In your pages, you have to add a 'code' section. In the code section, add the following php code:

Code:
echo '<div id="pagedescription" style="visibility: hidden">';
echo page_description();
echo '</div>';

Then, set Aggregator to find the summary by looking for an element with id "pagedescription".

It should work. The main drawback, of course, is that you will have to add this code to all your child  pages...
Logged
pcwacht
Guest
« Reply #23 on: May 21, 2007, 12:48:56 PM »

page_description


Maybe enhance the aggregater module to include and display stuff like:
Page_id, page_name, page_description, lastchangedate etc...

Didn't looked at the module yet so don't know if this is possible with the current version.

If you need me to digg into it let me know.

John
Logged
Eki
Documentation Team
******
Offline Offline

Posts: 108



WWW
« Reply #24 on: May 21, 2007, 05:09:18 PM »

The workaround proposed by @icouto is not too bad, but very intesive. To my opinion an option like adding the description, page_id etc. would be very usefull. Please let me know if there is anything I can help with...
Logged
Pages: [1] 2 3 Go Up Print 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!