Forums / Setup & design / how to make a community with ezpublish?

how to make a community with ezpublish?

Author Message

Daniele Nocentini

Thursday 01 June 2006 8:49:17 am

HI

I want to start web community with ezpublish and I want to allow the user to exchange messages from each other, how can I do with ez?

Antica Bottega Digitale srl
http://www.abd.it

Jeroen Sangers

Thursday 01 June 2006 9:38:05 am

Just use the built-in forum

Łukasz Serwatka

Thursday 01 June 2006 1:28:22 pm

You did not write about community portal requirements but I guess most of things can be easily implemented. With eZ publish you can allow users in the community to have their own blogs, galleries, news folders and much more. It is basically front-end editing and permissions setup. If some functionality is missing you can easily add it as eZ publish extensions.

Forum is great to place for shearing the information ;)

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Daniele Nocentini

Monday 05 June 2006 12:12:31 am

yes the forum is a good idea for community, but I need also that users can exchange private message from each other, If I write a message for an user, only this user can read my message. How must build an extension?

Antica Bottega Digitale srl
http://www.abd.it

Daniele Nocentini

Thursday 08 June 2006 2:23:52 am

any suggestion?

Antica Bottega Digitale srl
http://www.abd.it

Łukasz Serwatka

Thursday 08 June 2006 2:34:04 am

Just make a new table in your database where attributes are:

Example
sender_user_id (int)
reciver_user_id (int)
message (text or varchar)
date (date or timestamp)

Then write new module with view for sending messages and second view for browsing. Fetch only messages for currently logged in user:

Quick example which you need to extend for browsing:

<?php 

$db =& eZDB::instance();
$tpl =& templateInit();

$user =& eZUser:currentuser();

$rs = $db->arrayQuery( "SELECT * FROM messages WHERE reciver_user_id='" . $user->attribute('contentobject_id') . "'" );

$tpl->setVariable( 'messages', $rs );

$Result['content'] = $tpl->fetch( 'design:myext/messages.tpl' );
?>

Then use foreach for $messages and display sender name, date, and message in template.

I did not test the code, it is just quick suggestion which needs to be extended.

Proper way is to use eZ publish persisting object and fetch functions for database communication instead of direct SQL queries.

Good luck.

Let's us know when you make this "private messages" extension ;)

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

eZ debug

Timing: Jan 18 2025 11:06:51
Script start
Timing: Jan 18 2025 11:06:51
Module start 'content'
Timing: Jan 18 2025 11:06:52
Module end 'content'
Timing: Jan 18 2025 11:06:52
Script end

Main resources:

Total runtime1.3979 sec
Peak memory usage4,096.0000 KB
Database Queries205

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0101 587.8281180.8281
Module start 'content' 0.01011.1905 768.6563627.6406
Module end 'content' 1.20060.1972 1,396.2969341.0703
Script end 1.3978  1,737.3672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00440.3161210.0002
Check MTime0.00150.1097210.0001
Mysql Total
Database connection0.00150.109410.0015
Mysqli_queries1.304393.30332050.0064
Looping result0.00350.24812030.0000
Template Total1.358997.220.6795
Template load0.00240.168620.0012
Template processing1.356697.045920.6783
Template load and register function0.00010.007110.0001
states
state_id_array0.00160.116910.0016
state_identifier_array0.00170.123320.0009
Override
Cache load0.00200.1457350.0001
Sytem overhead
Fetch class attribute can translate value0.00190.138040.0005
Fetch class attribute name0.00140.098290.0002
XML
Image XML parsing0.00220.155540.0005
class_abstraction
Instantiating content class attribute0.00000.0018120.0000
General
dbfile0.00420.3001410.0001
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs