Wiccle.com in Facebook Wiccle.com in Twitter Wiccle.com in LinkedIn Wiccle.com in Youtube RSS from Wiccle.com Wiccle.com in Atom
 
 
 

Thread: Global parent-level elements

Started: January 24, 2010, 05:29 AM  ⋅  Zone: Public Forums  ⋅  Category: Install & Modification  ⋅  Posts: 35  ⋅  Views 917
Started by: john  ⋅  Description: Can parent-level elements be created as 'Global', allowing all members to post to them?
Post #1
Member: john  ⋅  Date: January 24, 2010, 05:29 AM  ⋅ Subject: "Global parent-level elements"

Hi Markus,

Is it possible for me to create a single parent-level element in each module in which all members can post - eg. "Everyone's Blog" and "Everyone's Gallery" etc into which all members can post entries without having to create their own Blog and Gallery?

I know this is a default facility in Articles and Links - I'd like to extend it to all modules in my site. I've been testing various user-masking scenarios but can't seem to get there.

Thanks.

Post #2
Member: Markus  ⋅  Date: January 24, 2010, 06:18 AM  ⋅ Subject: "Re: Global parent-level elements"

This is something that is accomplished through editing the module configuration files. Off the top of my head (copypaste from articles_config.php):

$core['module']['global_parent'] = TRUE; // Allow posting to global element?
$core['module']['req_owned_parent_for_post'] = FALSE;
$core['module']['single_parent'] = FALSE;

The corresponding settings in blogs_config.php are:

$core['module']['global_parent'] = FALSE; // Allow posting to global parent?
$core['module']['req_owned_parent_for_post'] = TRUE;
$core['module']['single_parent'] = TRUE;

Should allow you to create a single blog container into which all members can post. Note that some of the switches in the configuration files (notably category and parent creation) have been brought under the control of the usergroup permission masks since, and are just vestiges that I need to clean up. I will get around to documenting them as soon as I can -- it's an important part of our module creation API.

Whatever you do there won't break anything if it doesn't work and you switch it back, unless you keep switching it and posting content over and over with different settings, in which case you may need to delete some of the content that's gotten lost in the wilderness. Good luck with the experiment, and let me know if you run into any problems.

I can't jump into testing this myself right now as I have just upgraded our old demo about 45 times over to get the massive upgrade script right -- light at the end of the tunnel. =)

Post #3
Member: john  ⋅  Date: January 24, 2010, 06:36 AM  ⋅ Subject: "Re: Global parent-level elements"

Many thanks Markus.

I will try this and keep you posted.

Post #4
Member: Markus  ⋅  Date: January 24, 2010, 07:09 AM  ⋅ Subject: "Re: Global parent-level elements"

You're welcome, thanks for asking. Moreover, if only administrators can create parent-level containers, then the "single_parent" setting will effect whether you can create one or many blog parent containers into which members can post.

Where everyone is given permission to create parent-level containers, where reg_owned_parent, single_parent and global parent are false, the result is something akin to what you see in the Groups module, and so on. In case you want to take it one step further, clone a module and start making it into something new. =)

Post #5
Member: john  ⋅  Date: February 27, 2010, 04:18 AM  ⋅ Subject: "Re: Global parent-level elements"

Hi Markus,

I had posting to global parents working fine in 1.20 but in 1.21 I can't get it working in Blogs, Gallery and Video (works fine in News, Articles & Links).

Has something changed in Blogs, Gallery and Video that would affect global parents or is this something of my own doing?

Post #6
Member: Markus  ⋅  Date: February 27, 2010, 01:07 PM  ⋅ Subject: "Re: Global parent-level elements"

So you've changed those modules in the module config files to work as global parents? M'afraid your changes were overwritten in the upgrade... As some of the config files received a couple of tweaks and extensions. Simply switch the settings you changed back to as they were (changing it in the 1.21 files rather than putting the 1.20 files back in place). I need to add in separate "config_ext.php" files for each module to avoid this reverting business (as we do with the layout grid at the moment). Sorry about that.

It's just that for so long we've had all these options and no-one has been using them; I need to start paying more attention to not reverting anything with upgrades. With that in mind, the more people can tell me about the nature and scope of the modifications they make, the better I can preserve them in future upgrades.

Post #7
Member: john  ⋅  Date: February 27, 2010, 06:28 PM  ⋅ Subject: "Re: Global parent-level elements"

I picked-up that the files had been overwritten so I made the appropriate changes in all modules in 1.21 (which is how I got Articles, News and Links working with global parent). I made the same changes in Blogs, Gallery and Video but they still ask for parents to be created.

I just double-check my changes and they're all as instructed. Could it be something else?

Post #8
Member: Markus  ⋅  Date: February 27, 2010, 07:21 PM  ⋅ Subject: "Re: Global parent-level elements"

That's odd -- can't see any immediate reason for that beyond the changed configs. Would you like me to check it out for you? If so, please set me up with a temporary admin account at your site and I'll have it fixed for you. Also if you could zip up your 1.21 modules folder and your old modules folder and mail them to me so I can inspect the config files, as I'm pretty sure that's where the issue is.

Post #9
Member: john  ⋅  Date: February 27, 2010, 09:07 PM  ⋅ Subject: "Re: Global parent-level elements"

Thanks Markus. I appreciate your help as I can't seem to get this one figured out.

I've emailed you the requested files and site access details.

Post #10
Member: john  ⋅  Date: February 28, 2010, 03:50 AM  ⋅ Subject: "Re: Global parent-level elements"

This is getting very strange. As per this old post I also changed my 1.21 members & language files to accommodate 2 character usernames. However, I'm still getting the "Username too short etc" message. - I had this working fine in 1.20. (like global parents). I've obviously screwed something up but I have no ideas as to what.

Post #11
Member: john  ⋅  Date: February 28, 2010, 05:31 AM  ⋅ Subject: "Re: Global parent-level elements"

Hi Markus,

Before you waste any of your time on this - I believe I know what the problem is (ME!) - I'd just like your advice on fixing it.

When I was FTPing the upgrade files to my server (prior to running the upgrade script), I 'lost' my connection on 4 occasions - I have no idea whether it was Filezilla, the network or my host - I was simply 'disconnected' from my server. I restarted from scratch each time. On the last attempt, I was called away for a few hours and I can't recall (when I returned) checking Filezilla's status messages. I proceeded with the upgrade script - no problems. Have been making my template changes ever since - no problems.

Over the last hour or so I've been checking my files - many still say 1.20!!! Obviously my last FTP didn't finish either!

Can I ask your advice on the following:

1.  Can I re-FTP all upgrade files and run the upgrade script again?

2.  Will it corrupt my database - trying to re-create fields which already exist?

3.  I've backed-up my sql database, 'everything' in iWiccle 1.21 and my 'templates' folder - have I missed anything?

4. If I can't re-run the upgrade script, what are my alternatives?

Thanks for any advice you can provide (I'll be more diligent next time). Embarassed

Post #12
Member: Markus  ⋅  Date: February 28, 2010, 09:53 AM  ⋅ Subject: "Re: Global parent-level elements"

Of course you can, that's the whole point of this forum. Cool  I figured something like this was going on! (Haven't had a chance to look at the files yet.)

If you've successfully ran the upgrade script, you don't need to and shouldn't run it again. The database changes have already been done. The upgrade script does nothing for the filesystem, it's database-only upgrader.

Just re-upload the files, and you can do that as many times as it takes to get it right. These two aspects of the upgrade (any one of our upgrades so far) are essentially isolated from each other, and no script running is required for the files updating.

Let me know if it works, and if it's still a no-go, I'll log in and get it fixed for you.

As for what you need to back up whenever you upgrade, basically you should grab a copy of the old folders that are receiving the upgrade files.

Whenever I get around (which is very soon) to isolating every modification option to extension files, I will include a filesystem integrity checker into the upgrade. FIC is already coming as an area of the Admin CP in either case, to further boost up security and let you scan your entire system for outdated or adulterated files. This will further help in avoiding situations such as the one you just bumped into.

It will also feature a filesystem backup tool for the admin, and a bit more refined integrated database backup and restore as well. (To tell you the truth, I need to double check the current Admin CP backupper as I'm not quite certain if I remembered to add the new tables to be included in the backup process! I'll make sure this is covered for the .1 maintenance release.)

Post #13
Member: Markus  ⋅  Date: February 28, 2010, 10:08 AM  ⋅ Subject: "Re: Global parent-level elements"

Important note: If anyone is experiencing unexpected issues on their site, be sure to check that the problem isn't in the files on your server due to corrupted uploads or other possible reasons for corruption; also, if you need to send in files to me for analysis, first download them off your server into a separate folder, and zip that up so I get to see that actual files that are being dealt with.

I just had a quick battle with a certain old site of mine (untouched for three years or so), attempting to upload a file over and over again and calling it in the browser only to find the screen showing blank; turns out the site was actually out of filesystem space, and therefore the file was just getting truncated to zero bit length. (Of course I first assumed that it was just throwing a fatal error as I did some changes "blind" and uploaded without local testing, but didn't see anything either on-screen or in error logs.) So always expect the unexpected!

By the way I have now tagged the username length setting as a feature request for configuration. In case I ever note that something is going in, and it's not showing up in releases, feel free to remind me as little things like this sometimes slip me when I'm working 10 new areas of code at once...

Post #14
Member: Footman  ⋅  Date: February 28, 2010, 01:29 PM  ⋅ Subject: "Re: Global parent-level elements"

I just had a thought (scary I know) - Should we delete the "Install" and the "Upgrade" directories after everything is completed or are they still needed for something?

Post #15
Member: Markus  ⋅  Date: February 28, 2010, 02:31 PM  ⋅ Subject: "Re: Global parent-level elements"

I have answered this in a separate thread: Deleting Install and Upgrade Folders

Post #16
Member: john  ⋅  Date: February 28, 2010, 05:44 PM  ⋅ Subject: "Re: Global parent-level elements"

Thanks for the advice Markus.

I'll be re-uploading all 1.21 upgrade files and re-testing everything shortly.

Post #17
Member: Markus  ⋅  Date: February 28, 2010, 07:50 PM  ⋅ Subject: "Re: Global parent-level elements"

Let me know how it goes, and if it's still broken I'll come over and fix it.

Post #18
Member: john  ⋅  Date: March 1, 2010, 09:10 PM  ⋅ Subject: "Re: Global parent-level elements"

Hi Markus,

Yes, it's still broken Frown. I re-uploaded all the 1.21 upgrade files, made the appropriate changes as per instructions - but I simply cannot get the following working again:

  • global posting in Blogs, Video and Gallery
  • registering 2 character usernames

I've run out of ideas on where my problem/s might lie.

Can I take-up your offer of help please?

Post #19
Member: Markus  ⋅  Date: March 1, 2010, 09:19 PM  ⋅ Subject: "Re: Global parent-level elements"

Yes of course. I will take a look at it during the coming hours and have you fixed up. Cool

Post #20
Member: Markus  ⋅  Date: March 2, 2010, 12:40 AM  ⋅ Subject: "Re: Global parent-level elements"

Well first of all let me say that I like what you've done with the site a lot; after I logged in and looked around, felt like writing a review and featuring how you've been putting our software to good use! Even while it's a private site, please consider submitting a snapshot with selected views when the site is completed. That draggable tutorial box you used was spot on.

On a general note, if you need to import content of whatever sort from old sites, you don't have to keep doing it manually unless you want to. A quick convertor script leeching content off old sites (as long as it's somehow structured), breaking it to the right fields, and importing it with necessary additions into the iWiccle database is also a possibility. I've been using all sorts of little convertor scripts for in-house dev work when we've been importing customer products in bulk (like with Joyce Bookstore's 600+ schoolbooks, parsing them in straight from the old site's HTML) from CSV and other structured source data.

While we're on the topic of our customer sites (that contribute a great deal to the evolution of our software as it lets us do hands-on development and debugging instead of creating hypothetical software), Nigel's Cycles, a Galway bicycle store, just went live with their new Wiccle site featuring a Wiccle eStore and their cycling products. On Nigel's site, you will see how we used cross-module content enveloping (much like on the iWiccle main index page) in a combination of custom content and store products sorted by specific criteria. (Simply use the "Module" switch in the builder to cross-fetch content between modules. That's what it's in for.)

And since I went off on a tangent here, more on your problem with more focus in the next post... This time o'night again! Laughing

 

Install & Modification

Add to Favorites
Public Forums
Category  ⋅  Deploying iWiccle and Wiccle into unique solutions that match your needs.
 

Public Forums

Add to Favorites
Public Forums
Zone  ⋅ Public forum sections for support and discussions. Available for everyone.
 

Zone Categories

 
Questions? Ask us!
Back to Top