The link below doesn't work. Does anyone have this plugin? Basically, I am 
trying to add reply and share button to each post (like the attached 
picture), same like they have in facebook. Stumbled upon this link. 
Haven;'t gone through the post yet. Wondering if anyone done anything 
similar like reply and share to each post?



On Tuesday, March 6, 2012 at 1:10:06 PM UTC-5, Ale wrote:
>
> I found what I need here:
>
> http://dev.s-cubism.com/plugin_comment_cascade
>
> Thank you all.
>
> On Tuesday, March 6, 2012 8:34:35 AM UTC-3, Ale wrote:
>>
>> Good morning everyone. I am making a simple application, but I'm running 
>> into some doubt. I wanted to do something like thefacebook posts .. Where
>>  I have a site that I put a post, listed below are all posts with the 
>> option to comment on them. So far so good .. But how to write the data's 
>> comment in a post post correct? Attached I am sending the screen of my 
>> application, I think it is easier to visualize what I wanted. 
>> Transmission also Model / View / Controller. If you can help me will be 
>> grateful.
>>
>> I'd have to get the id of the post via ajax?
>>
>> My model:
>>
>> Post = db.define_table('post',
>>     Field('title'),
>>     Field('post'),
>>     format="%(title)s"
>>     )
>>     
>> Comment = db.define_table('comment',
>>     Field('post', 'reference post'),
>>     Field('comment')
>>     )
>>
>> My Controller
>>
>> def index():
>>     form = SQLFORM(Post,
>>                     formstyle="divs",
>>                     submit_button="Postar").process()
>>     
>>     form2 = SQLFORM.factory(
>>                     Field('comment', requires=IS_NOT_EMPTY()),
>>                     formstyle="divs",
>>                     submit_button="Comentar")
>>     if form2.process().accepted:
>>         print request.vars
>>         print request.args
>>         response.flash = 'form accepted'
>>     elif form2.errors:
>>         response.flash = 'form has errors'
>>     else:
>>         response.flash = 'please fill out the form'
>>  
>>     
>>     posts = db().select(Post.ALL)
>>     return dict(form=form, form2=form2, posts=posts)
>>     
>>
>> my view:
>>
>> <div class="post">
>>     {{=form.custom.begin}}
>>         <p>Title</p>
>>         {{=form.custom.widget.title}}
>>         <p>Post</p>
>>         {{=form.custom.widget.post}}
>>         {{=form.custom.submit}}
>>     {{=form.custom.end}}
>> </div>
>> <div class="posts">
>>     {{for post in posts:}} 
>>         <li class="posts" id=post_{{=post.id}}>
>>             <p>{{=post.post}}</p>
>>             <p>{{=post.id}}
>>             <div class="comment">
>>                 {{=form2.custom.begin}}
>>                     {{=form2.custom.widget.comment}}
>>                     {{=form2.custom.submit}}
>>                 {{=form2.custom.end}}
>>             </div>
>>         </li>
>>     {{pass}}
>> </div>
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to