Author Topic: Teaser Module / Snippet?  (Read 3239 times)

mete

  • Guest
Teaser Module / Snippet?
« on: April 10, 2008, 12:32:26 PM »
Hello to everybody,

I am planning a website for a company and am definitely going to use WB as CMS. I have done a couple of sites with it and I actually am confident that it'll work out well this time, too.

While planning the need for a teaser-component arose which we plan to use on listing-pages which lead to detail pages. As the system will be used by this company later on, the editors want to have a module or a snippet in backend which allows them to insert a picture, text and a link which then forms a complete teaser that will be displayed on the page. The idea is like having a different modules on one page (e.g. WYSIWYG, Code etc).

I would like to know if this would be possible (which probably is) and how I could manage this. To be frank I have never made a module or snippet before and I would love to get some aid from experienced users.

I am attaching an image of the planned teaser which shows two teasers of both types - with image and without - and hope that somebody could give me a hand with that.

Thank you all in advance..

Mete

[gelöscht durch Administrator]

doc

  • Guest
Re: Teaser Module / Snippet?
« Reply #1 on: April 10, 2008, 12:36:13 PM »
Hello,

have you already tried the News module which ships with WB; maybe in combination with the code snippet AnyNews (from the WB Addons repository)?

Regards Christian

mete

  • Guest
Re: Teaser Module / Snippet?
« Reply #2 on: April 10, 2008, 03:28:46 PM »
Hi there again Christian,

I have taken a look at the AnyNews Snippet. As far as I understand I could use it in combination with News, so to say I make news with News but display them with AnyNews, right?

Which unfortunately is kinda confusing, maybe not for me but for other editors. I am actually looking for a module which I call in backend, fill out the necessary parts (e.g. Header, Text, Picture and Link) and then it's ready to go.

Too hard? I just can't do it myself. I don't even know how to get it to the point where I could write into the database or call a picture from the media library due to my lacking php knowledge.


doc

  • Guest
Re: Teaser Module / Snippet?
« Reply #3 on: April 10, 2008, 03:56:20 PM »
Hello,

have you tried the News module as standalone module? Should already include all you need. The AnyNews is only if you want to display e.g. certain news as a teaser (e.g. last 4 news or something like that).

Regards Christian

mete

  • Guest
Re: Teaser Module / Snippet?
« Reply #4 on: April 10, 2008, 04:13:25 PM »
I am trying to style News as a teaser right now. This might work, there are yet some point which are of course missing.

I noticed I can assign images to groups and make a call to them as I mark a news item as member of a certain group, but I can't choose any picture from the media. To do that I would have to make new groups which I'd like to avoid.

One important missing part is that I do not know how to link the teaser to a certain page in WB. It does take me to a "read more"-view but this is not what I need.

mete

  • Guest
Re: Teaser Module / Snippet?
« Reply #5 on: April 10, 2008, 05:03:35 PM »
So I decided to give it a try and started modifying HelloWorld. Buckle up guys, this might be a tough ride because I'll be asking loads of questions :)

Here comes the first one:

I need to include an image in a teaser, so in the database I'd need a blob row right? Anyone wanna help me with integrating that field in backend to choose an image and have it written into the database?


Offline ruebenwurzel

  • Betatester
  • **
  • Posts: 8391
  • Gender: Male
  • Keep on Rockin
    • Familie Gallas Online
Re: Teaser Module / Snippet?
« Reply #6 on: April 10, 2008, 05:21:12 PM »
Hello,

if you use the news Modul you have for the short news and for the long news a WYSIWYG Editor field. With the WYSIWYG Editor you can choose the "Insert Image" button and than choos the media dir for the images. With this it should be easy to add and format images to the short news (teasers). This is independent from the group images.

The long text (wich appears when you hit the read more button) opens the same page with the long text. So as i understand you, you wanna have the read more button open not the longtext, it should open an new page. So this is possible with the news modul too. Simply remove in the settings of of the modules the part for the automatic generated read more button and then add the read more button in the short news by using the WB link modul. This makes the long text part of the news modul unnecessary. To make this unvisable you need to tweak the modify.php of the news modul.

So the result for the users is:
1. add the new page
2. add a new news, choose pictures in media dir by using the Editor and a link to the new created page by using WB link from Editor.

Thats all, simple and easy.

What have you to do:
Only make the long text in modify file unvisible, remove the read more part in settings of the modul and explain the  above steps your users

This is i think much more easier and faster, then to try to write a own modul, as the news modul brings all what you need.

Matthias

Offline pcwacht

  • Posts: 2923
  • Gender: Male
    • Dutch ICT info
Re: Teaser Module / Snippet?
« Reply #7 on: April 11, 2008, 12:08:09 AM »
Another option would be:
Rename the 'read more' to somthing wich suits you (look at the language file) or change it through the sttings of the news module

The news module simply lists all news items for that newspage, by clicking the read more link you'll get a new page with the long text
Since both short and long text are belonging to the same item you might get what you want quit easely.

Good luck,
John
http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....

chio

  • Guest
Re: Teaser Module / Snippet?
« Reply #8 on: April 11, 2008, 08:12:30 AM »
Do you want to have a date on each entry?
if not: You could also use the bookmarks-module or (german only and beta at the moment): the members module. here