@rockthenroll yeah, I’m already setting up the weblogs so that the group managers can’t edit the other weblogs but I think it’s only a stop gap for me. I’m concerned that as each weblog grows, that the Structure page in the control panel will begin to get very long and if a users weblog is near the bottom, could be a pain to find sections/pages. Just a thought, but adding a little jquery to collapse each weblog would be simple enough and keep the control panel page clean.
In regards to only displaying the weblog that the user has permissions to edit, does anybody know the best way to get the users usergroup directly from PHP? Could I then wrap the table row in a conditional tag so only table rows permitted based on the users member group would display? Does that sound reasonable?
thanks brian
Running into a weird issue with Structure 1.3.1 and EE 1.6.8 Build 20090915 where the settings for structure don’t save.
Going in and assigning a weblog to structure and setting a default template works. You can add pages. But then it seems after accessing the structure module page again, all the settings are reset to the defaults (Unmanaged and No Template).
I’ve verified that the settings are saved to the db originally, but something seems to be removing those entries after the fact.
I’ve used this module on a ton of other sites on the same server and never had this problem.
Any help is appreciated.
Thanks
@idawgik Did you create a tab for Structure? Make sure you didn’t bookmark it after changing settings or it will append a string that includes info to erase the settings every time you visit. Clear the tab and and revisit Modules » Structure and resave it. Let me know if that doesn’t work.
Category pagination:
After some further investigation of the pagination problem when using the category or category_group parameter in exp:weblog:entries, I discovered that in fact no WHERE clauses are actually being generated to narrow the result . I expect this is because the category can be specified using ampersands & and so a second query is necessary to get the count. I have therefore amended the pagination function to paginate properly; I can;t paste the whole function here (character limit) but this is the relevant bit (starting line 1273).
// Limit by categories
if($params['category']) {
$cat_ids = explode(" ", $params['category']);
if($cat_ids[0] == "not") {
$cat_ids = $cat_ids[1];
$cat_not = 'NOT';
} else {
$cat_ids = $cat_ids[0];
}
if (strstr($cat_ids,'&')) {
$cat_ids = explode("&", $cat_ids);
$cat_id_str = implode(",", $cat_ids);
# fetch a list of entry ids that appear in ALL categories listed
$sql = "SELECT entry_id
FROM exp_category_posts
WHERE cat_id IN ({$cat_id_str})
GROUP BY entry_id
HAVING (COUNT(entry_id) = ".count($cat_ids).")";
#echo $sql;
$query = $DB->query($sql);
if ($query->num_rows > 0) {
$found_ids = array();
foreach ($query->result as $row) {
$found_ids[] = $row['entry_id'];
}
$where_clause .= " AND entries.entry_id $cat_not IN (".implode(',',$found_ids).")";
} else {
return; // no matches so do nothing
}
} else {
$cat_ids = explode("|", $cat_ids);
$cat_ids = implode(",", $cat_ids);
$where_clause .= " AND categories.cat_id $cat_not IN ($cat_ids)";
}
}
// Limit by category_group
if($params['category_group']) {
$cat_group_ids = explode(" ", $params['category_group']);
if($cat_group_ids[0] == "not") {
$cat_group_ids = $cat_group_ids[1];
$cat_group_not = 'NOT';
} else {
$cat_group_ids = $cat_group_ids[0];
}
$cat_group_ids = explode("|", $cat_group_ids);
$cat_group_ids = implode(",", $cat_group_ids);
$where_clause .= " AND categories.group_id $cat_group_not IN ($cat_group_ids)";
}
// Build base for SQL query
$sql = "SELECT COUNT(DISTINCT(entries.entry_id)) AS c" .
" FROM " . $db_prefix . "_weblog_titles AS entries" .
" LEFT JOIN " . $db_prefix . "_weblogs AS blogs ON entries.weblog_id = blogs.weblog_id" .
" LEFT JOIN " . $db_prefix . "_weblog_data AS wlog ON entries.entry_id = wlog.entry_id" .
" LEFT JOIN " . $db_prefix . "_members AS members ON members.member_id = entries.author_id";
// Limit on category or category_group
if($params['category'] || $params['category_group']) {
$sql .= " LEFT JOIN " . $db_prefix . "_category_posts ON entries.entry_id = " . $db_prefix . "_category_posts.entry_id
LEFT JOIN " . $db_prefix . "_categories AS categories ON " . $db_prefix . "_category_posts.cat_id = categories.cat_id";
}
$sql .= " WHERE entries.site_id = " . $site_id;
if($where_clause) {
$sql = $sql . $where_clause;
}
I wonder if anyone can help me with this issue im having with structure.
I have added structure to a site which already has content in place, and previously used the pages module. Before i installed structure i turned off the pages module, and have since removed the posts which where associated with it.
When i try to setting up structure i get the following error.
MySQL ERROR: Error Number: 1054 Description: Unknown column ‘site_pages’ in ‘field list’ Query: SELECT site_pages FROM exp_sites WHERE site_id = 1
Any pointers appreciated thanks.
So this is my third go at Structure and I’m starting to think either I’m either over complicating it, or it’s haunted. I have followed both the installation guide and tried Travis’s tutorial. This time, I am perplexed at this step of the tutorial:
“Click the new Structure tab that appears on the publish/edit screen”
So up until that point, I have completed every step, but I never see this tab appear. I tried once last weekend and decided to have another go at it this morning. What am I missing?
This may have previously been covered but I don’t think want to comb through 53 pages to dig for it, so pardon me if this is was a redundant question.
Thanks, b
So this is my third go at Structure and I’m starting to think either I’m either over complicating it, or it’s haunted. I have followed both the installation guide and tried Travis’s tutorial. This time, I am perplexed at this step of the tutorial: “Click the new Structure tab that appears on the publish/edit screen” So up until that point, I have completed every step, but I never see this tab appear. I tried once last weekend and decided to have another go at it this morning. What am I missing? — This may have previously been covered but I don’t think want to comb through 53 pages to dig for it, so pardon me if this is was a redundant question. Thanks, b
Have you enabled the Extension under Extension Settings? That’s the piece of the puzzle that makes that tab appear
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.