Idea of Features, Ads

7 views
Skip to first unread message

Ansar.ich

unread,
Nov 4, 2009, 6:47:16 AM11/4/09
to CommunityEngine
Hi,
I am writing tech docs on community engine db schema, ideas etc.
Can anyone tell me what was the main idea of having "Homepage
Features" and "Ads"?

Bruno Bornsztein

unread,
Nov 4, 2009, 9:13:00 AM11/4/09
to communi...@googlegroups.com
Hi,
First off, I'm glad to hear you're working on documentation (it's
sorely needed, and I need all the help I can get with it).

Homepage Features is kind of a deprecated feature: I used to use it on
Curbly to do a slideshow of featured posts on the home page, but
haven't used it anywhere for a long time. Basically, a
homepage_feature is just an item with a title, text and link that you
can use to promote blog posts, users, whatever you like. There's no
default implementation for it in CE, though, so if you want to use it,
you'll have to do HomePage.feature.find(:all) in the controller where
you want to display them.

Ads is undocumented, but actually quite useful. An Ad is an object
with a 'location' string and a chunk of html. It's a way to allow you
to put arbitrary HTML (or javascript) into pages. So, for example, if
you wanted to show an ad on the homepage somewhere, then in
site_index.html.haml, you'd add:

Ad.display(:homepage_ad, logged_in?)

And then you could create Ad objects with the location 'homepage_ad',
and they'll show up on the homepage. Ads support start and end times,
can be targeted to specific groups of users (logged_in, logged_out,
everyone), and can be rotated by weight (multiple ads with the same
location will randomly appear in that spot with frequency according to
their weight).

Hope this helps,
Thanks,
Bruno

Anzor Israilov

unread,
Nov 4, 2009, 1:06:39 PM11/4/09
to communi...@googlegroups.com
Thank you Bruno, that really helped
About documentation: I compeleted db schema (with an older version of CE thought - with 62 migrations), and something about 50% of use cases. When I started developing with CE, the main questions were: "what it can do?" and "what are the ideas of all the components?" So I started with that.

Rj

unread,
Nov 5, 2009, 1:09:14 AM11/5/09
to CommunityEngine
On Nov 5, 2:06 am, Anzor Israilov <anzor.israi...@gmail.com> wrote:

> About documentation: I compeleted db schema (with an older version of CE
> thought - with 62 migrations), and something about 50% of use cases. When I
> started developing with CE, the main questions were: "what it can do?" and
> "what are the ideas of all the components?" So I started with that.

That's fantastic. Where is it hidden?

Rj

Anzor Israilov

unread,
Nov 5, 2009, 4:35:18 PM11/5/09
to communi...@googlegroups.com
At work :) I will upload db scheme tomorrow.

Ansar.ich

unread,
Nov 6, 2009, 5:49:48 AM11/6/09
to CommunityEngine
CE db_schema: http://communityengine.googlegroups.com/web/db%20schema.pdf?hl=en&gsc=ZZERugsAAADHdhvXI7-kR0e8Ql7bp4Q7
I'll update it to the new version later. Original file is Sybase Power
Designer PDM, so if you want I can upload it too. Trial version of
Power Designer can be used to work with it.
Reply all
Reply to author
Forward
0 new messages