Yii Framework Forum: wall for community site - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

wall for community site Rate Topic: -----

#1 User is offline   dimis283 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 277
  • Joined: 24-January 09

Posted 06 October 2011 - 04:59 AM

I have a community site with users who can upload photos,videos etc and I want to create a "wall page" (like face book wall).
How could I implement this.My problem is that I want to show videos etc (they are in separate tables) order by date and time and not the videos first and then the photos etc.
Is there a sql to implement this.
Suppose that the tables are
video:id,videoname....
photos:id,photoname....
I use the last version of Yii
Posted Image
0

#2 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,339
  • Joined: 12-October 09
  • Location:Croatia

Posted 06 October 2011 - 05:06 AM

View Postdimis283, on 06 October 2011 - 04:59 AM, said:

Is there a sql to implement this.


Not sure what you mean with this... If you mean one SQL command to get all the different data... maybe it can be done... but a good analisy of your problem woudl be needed... and that is up to you ;)

What you need is something like an index page or a dashboard... that is a page that has different components on it (pictures / videos / messages)... so one idea would be to create widget for every component... and from that widget you get the data you need sorted the way you need it...
Find more about me.... btw. Do you know your WAN IP?
0

#3 User is offline   dimis283 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 277
  • Joined: 24-January 09

Posted 06 October 2011 - 05:11 AM

thank you for the replay,it may done but also I thought to create only one table with one field "type" as video/photo etc but maybe this table will be too large
Posted Image
0

#4 User is offline   Sam G'nar 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 16-January 12

Posted 20 January 2012 - 09:00 AM

View Postdimis283, on 06 October 2011 - 04:59 AM, said:

I have a community site with users who can upload photos,videos etc and I want to create a "wall page" (like face book wall).
How could I implement this.My problem is that I want to show videos etc (they are in separate tables) order by date and time and not the videos first and then the photos etc.
Is there a sql to implement this.
Suppose that the tables are
video:id,videoname....
photos:id,photoname....
I use the last version of Yii


Don't have it as an overlay. Have a structured format.
0

#5 User is offline   drew shobbrook 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 22-November 11

Posted 20 January 2012 - 09:07 AM

make a table for the feed and every tine a new object is posted update the table. Date/Time , desc, URL

Not sure if that is what you said in your second post
0

#6 User is offline   Ivica 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 315
  • Joined: 25-May 11

Posted 06 April 2012 - 05:37 AM

You need to use MySql UNION to get data from different tables(you will maybe need to wrap some field names, so fields from all tables match same names, for example text, link, postedBy, date and so on)
Check:
http://dev.mysql.com...1/en/union.html
Zurmo: Yii Powered Open Source CRM
zurmo.org
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users