Edit the blog description

Edit the blog description

Postby gastoncs on Tue Mar 04, 2008 11:24 am

I think I need it to post it in English jejeje
I make a form that through that form I am calling the blog class, the user class and the permissions class, when I call the blogg class I pass a parameter that creates the blog description the thing is that after the blog is already created I want to be able to edit the blogg description I try to use this module to edit it AdminUpdateBlogSettingsAction( $actionInfo, $request ) but I am having difficulty to understand the parameters that I have to pass the $actionInfo and $request.

Is there any other way to edit the blog description?

Thanks in advance
gastoncs
 
Posts: 25
Joined: Wed Feb 13, 2008 11:24 am

Postby jondaley on Tue Mar 04, 2008 1:41 pm

You probably don't want to call into the admin class stuff.

You want to use something like this:

Code: Select all
$blogInfo->setAbout( "stuff" );


If you don't already have a bloginfo object, you'll need to create a blogs object, and then call $blogs->getBlogInfo($id) or $blogs->getBlogInfoByName($name)
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Postby gastoncs on Tue Mar 04, 2008 3:11 pm

Ok so first I create the blogs object
$blogs = new Blogs();

Then I get the info from the blog
$getinfo=$blogs->getBlogInfo(84);

Then I need to create the BlogInfo object in order to set the about
$blogInfo = new BlogInfo(?,?,?,?);

Then I change the about of the object
$infochange=$blogInfo->setAbout( "stuff" );

Here is were I get lost new BlogInfo(?,?,?,?); I try this before
what parameters should I pass, what I understand is that I use this to create the blog.

Thanks for your help
gastoncs
 
Posts: 25
Joined: Wed Feb 13, 2008 11:24 am

Postby jondaley on Wed Mar 05, 2008 12:53 pm

I am not sure what you are doing with the new BlogInfo part. You aren't trying to create a new one, but modify an old one, right?

How about this?

Code: Select all
$blogs = new Blogs();
$getinfo=$blogs->getBlogInfo(84);
$getInfo->setAbout( "stuff" );
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Postby gastoncs on Wed Mar 05, 2008 12:55 pm

yes that is correct I am trying to modify an old one, thanks let me try this
gastoncs
 
Posts: 25
Joined: Wed Feb 13, 2008 11:24 am

Postby gastoncs on Wed Mar 05, 2008 4:28 pm

It did not work that way

what i was try to say is that the $blogInfo->setAbout( "stuff" );function
is on the new BlogInfo(?,?,?,?); class
I have little experience on oop so if I am wrong please let me know.

But it did not change the description.

any other suggestion?
gastoncs
 
Posts: 25
Joined: Wed Feb 13, 2008 11:24 am

Postby jondaley on Wed Mar 12, 2008 12:17 pm

You might have to save the bloginfo back to the database? I don't remember off the top of my head.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch


Return to LifeType 2.0 Development

cron