English (United Kingdom)
Jms Multi Site, formerly joomla multisite.
Create, share multiple joomla sites in few clicks !
Message
  • EU e-Privacy Directive

    This website uses cookies to manage authentication, navigation, and other functions. By using our website, you agree that we can place these types of cookies on your device.

    View e-Privacy Directive Documents

Welcome, Guest
Please Login or Register.    Lost Password?
Go to bottomPage: 1
TOPIC: SiteStatus
#4508
SiteStatus 14 Years, 6 Months ago Karma: 0
Hello

It would be very helpful to have a list of available fields that are accessible for use with SiteStatus. I would like to set the status of a site using the owner_id

Would this be valid code?
Code:

MultisitesUtils::updateStatus( 'owner_id', $owner_id, $newStatus);


Basically I would like to be able to change the status of all the sites of a given user.

Thank you in advance
Dave
DaveC
Senior Boarder
Posts: 77
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#4514
Re: SiteStatus 14 Years, 6 Months ago Karma: 54
Yes this will probably works.
As you have all the code of JMS, I can just suggest you to test it and read the source "utils.php" that use the "site.php" source concerning the definition of a site.
You will find all candidate key but becarefull that they are not always filled.

The only one that is guarantee is the "id" that correspond to the Site ID.

So experiment it.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#4524
Re:SiteStatus 14 Years, 6 Months ago Karma: 0
Hello

I have figured it out. May I suggest a small change to this function?

I know it is bad to change JMS core files so I will probably copy this function into my plugin. If you remove the
Code:

return true;
on line 197 of utils.php the foreach will loop through ALL sites instead of stopping when it finds a match.

This will allow you to set the status on all sites of a given user using owner_id

Thank you very much for your reply. I did get this to work using owner_id but only on the first site that is created gets set to Confirmed. Strangely the the next sites that are built are set in pending.

see the following for the results screencast.com/t/NmEyMzAz


Dave
DaveC
Senior Boarder
Posts: 77
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2010/06/19 05:49 By DaveC.
The administrator has disabled public write access.
 
#4531
Re:SiteStatus 14 Years, 6 Months ago Karma: 54
YES, I will do it and add an optional parameter in the API to allow "$apply2AllSites = false".

By default the parameter will be false to work like today and in the future, if you put "true", this will allow process (scan) all the records.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#4538
Re:SiteStatus 14 Years, 6 Months ago Karma: 0
Thanks Edwin, That sounds like it will be perfect. Also while you thinking about how about adding delete sites to your API.

Thanks
Dave
DaveC
Senior Boarder
Posts: 77
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#4540
Re:SiteStatus 14 Years, 6 Months ago Karma: 54
Add and delete is performed by Multisites itself.
So use our Multisites front-end componnent to do that.
You can now change the layout from the front-end and create your own template.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
get the latest posts directly to your desktop
2Win, Multisite(s) are trademarks of Edwin2Win.
Joomla