Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3]

Author Topic: [THEME] Looking for interested beta testers  (Read 2873 times)

nukpana

  • Hero Member
  • *****
  • Karma: 71
  • Posts: 663
Re: [THEME] Looking for interested beta testers
« Reply #30 on: September 04, 2011, 01:52:19 PM »

How's the changed "you've got comments" thing working? better?
My personal opinion is I don't like it.

My suggestion is this:
1. Utilise the right side of the breadcrumb bar for the admin - when viewing the admin pages, remove the fb/twitter/rss icons and add a comment icon
    a. greyed out when no comments to be approved of
    b. red when there are
2. View the information as you have it in a dropdown

In theory, you can move the settings & files link to the top bar as well to free up the sidebar.
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: [THEME] Looking for interested beta testers
« Reply #31 on: September 04, 2011, 02:31:18 PM »

Quote
My personal opinion is I don't like it.

Ok, I hear you. I'll see what I can do about it, however your suggestions above goes against your previous suggestion about making the comments admin more prominent (which I agree with). The grey/red comments icon doesn't give enough of a clear signal that there are new comments to approve, in my opinion, even if it might look good.

The concept for this theme is to follow the age-old sNews partyline of not having separate public and admin parts and that means squeezing the admin parts into the public costume. Meaning that some alterations for admin are fine -like the sidebar- but there's a limit to how many or how big differences there can be without disrupting the user experience (imo).

I'll keep the above suggestions in mind though I think they're more likely to appear in another theme.
You know I appreciate the suggestions and am grateful for all the help though.
Logged

nukpana

  • Hero Member
  • *****
  • Karma: 71
  • Posts: 663
Re: [THEME] Looking for interested beta testers
« Reply #32 on: September 04, 2011, 04:16:22 PM »

Ok, I hear you. I'll see what I can do about it, however your suggestions above goes against your previous suggestion about making the comments admin more prominent (which I agree with). The grey/red comments icon doesn't give enough of a clear signal that there are new comments to approve, in my opinion, even if it might look good.
Well, sort of.  I guess the current execution needed more work and I gave a suggestion of that.  The red icon would be striking out to the user/admin as the rest of the theme is blues and greys - look at your current admin logon page for the contrast.  You can disregard the greyed out button suggestion, since the red notification can be shown ONLY if there is comments to be approved of

Check out a quick mock up and decide for yourself:


Quote
The concept for this theme is to follow the age-old sNews partyline of not having separate public and admin parts and that means squeezing the admin parts into the public costume. Meaning that some alterations for admin are fine -like the sidebar- but there's a limit to how many or how big differences there can be without disrupting the user experience (imo).
My suggestions go along with that same premise.
« Last Edit: September 04, 2011, 04:33:22 PM by nukpana »
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: [THEME] Looking for interested beta testers
« Reply #33 on: September 05, 2011, 02:27:50 AM »

Testing the approve comments balloon in the bredacrumb bar now. Fixed a few things in admin styling as well although new issues appeared as a consequence, plus I get discrepancies between my local install and the online one in a couple of places - why I do not know (login submit button jumps online, does not jump locally; new comments balloon icon is cut off at the top online, not so locally ... totally illogical and, like, weird).

The comments waiting icon looks okay (if it wasn't cut off at the top) and the thing is certainly less obtrusive than when the approval thing is in the sidebar, but ... I don't know. I think the higher visibility of having it in the sidebar is better.
Others opinion of it?
Logged

jesth

  • Jr. Member
  • **
  • Karma: 1
  • Posts: 66
Re: [THEME] Looking for interested beta testers
« Reply #34 on: September 05, 2011, 01:52:53 PM »

Will there be any changes to the Math Captcha? The one Matt made, with images seems quite nice, and maybe more secure, anyways, just a thought.
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: [THEME] Looking for interested beta testers
« Reply #35 on: September 05, 2011, 06:41:27 PM »

Short answer: no MathCaptcha.

From the changelog, section "snews.php", first list point
Quote
The original sNews 1.7 uses a mathCaptcha as security for login, comments and contact forms. This has been replaced with a simple, yet effective, honey trap. Just keep in mind that this is a basic form of security, mainly targeting robots and not humans. You may need to add more security layers on your own.

MathCaptcha is also a basic form of security btw and not very secure anymore. An image-based version is of course more secure than the MathCaptcha. Whether it's more secure than the honey trap I can't say, I'm no security expert. The honey trap has proven effective against bots which is why I opted for it but like MathCaptcha it can be broken if people try hard enough.
Logged

nukpana

  • Hero Member
  • *****
  • Karma: 71
  • Posts: 663
Re: [THEME] Looking for interested beta testers
« Reply #36 on: September 06, 2011, 06:47:55 PM »

Re: new updates - I like how they are coming along personally. Just need to be refined style wise. 

Functionality - for those running w/o JS one couldn't login....   Your href should be the normal login page.

The edit-comments page gets the normal sidebar - so "editcomment" should be in the catlistSEF list for consistency
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: [THEME] Looking for interested beta testers
« Reply #37 on: September 06, 2011, 09:39:29 PM »

1. Thanks, still on the fence regarding comments approval though...

2. Yep, leaving that to the last set of updates when all styling is done. It's on the list though. (you can of course type in the login url manually, that still works...)

3. Yeah there was a typo in the list, it said "edit-comments" instead of "editcomments..." fixed locally. On the other hand, hard pages (Contact, Archive, Sitemap) get admin sidebar since they're in the sefcat list ... and I don't see a way around that, other than making the hard pages user-created instead - which of course is an option.

Thanks
Logged

nukpana

  • Hero Member
  • *****
  • Karma: 71
  • Posts: 663
Re: [THEME] Looking for interested beta testers
« Reply #38 on: September 07, 2011, 12:50:40 PM »

Re:#3

Ok I did an update for you on this:
I did a function called is_admin() that takes a t/f parameter if you want the login page or not as part of the admin pages (defaults to false so it can be empty)
Code: [Select]
function is_admin($exclude_login = FALSE)  {
global $categorySEF;
$sys_pages = array_slice(explode(',', l('cat_listSEF')), 3);
if( _ADMIN ) {
if(
in_array($categorySEF, $sys_pages)
|| in_array($_GET['action'], $sys_pages)
) {
return TRUE;
}
} else {
if( $exclude_login === FALSE ) {
return in_array($categorySEF, $sys_pages);
}
}
}

For your usage:

No login page as admin
Code: [Select]
<?php if(is_admin(TRUE)) { include('admin-sidebar.php'); } else { //regular sidebar ?>
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: [THEME] Looking for interested beta testers
« Reply #39 on: September 07, 2011, 04:13:24 PM »

Quote
Ok I did an update for you

While I appreciate the update, I don't see the need for it. To get to the login page, whether in admin or not, you'd need to manually enter the login url (or perhaps add a link to it somewhere on the page). Which will give you the standard result - "You are logged in" if logged in, login form if not - which is as it should be imo. Maybe I'm missing something?

The issue with archive, contact and sitemap pages getting admin sidebar when in admin (and only then) is easy to solve by making them user-created pages (and of course including their data in the initial sql file), but login - as I see it - is not a problem.

I'm posting the final updates later today and if there are things that people are missing or desperately want to see in the theme, that would be the time to speak up. Right now I'm finishing up the other two colour schemes that will be included by default ("Mars" and "Venus" - I'll leave it up to your imagination to figure out the colour palette for those ;)) and plotting the coming themes. The plan is to publish the first theme at the end of this week and then one new theme per week until I run out of steam...
Logged

nukpana

  • Hero Member
  • *****
  • Karma: 71
  • Posts: 663
Re: [THEME] Looking for interested beta testers
« Reply #40 on: September 07, 2011, 06:19:18 PM »

I think you misunderstand. The code is to allow other code to show only on admin pages only - ie your issue with the sidebar showing on public pages.  Whether you want to include the login page as part of the admin pages is up to you ( or anyone else use that snippet ).  I think the example I gave explained it well.
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: [THEME] Looking for interested beta testers
« Reply #41 on: September 08, 2011, 04:11:24 AM »

I don't know ... don't really feel up for this right now, with the airplane tragedy in Russia and everything else that's going on in the RW. Will note a couple of things though.

* Beta updated.
@Jason: you're right, I didn't fully understand the updated code so I've implemented it, to try and understand it better, and I don't see that there's all that big of a difference compared to the earlier version. It's less code so that's good. On the other hand, class "current" gets screwed up in the admin sidebar, which is an unwanted effect (using the same filter as in categories and pages function to check if current or not). And login page still appears if the url is typed in the addressbar, but maybe that was never intended to be affected.

* Minor details remain to fix before public release, like a few more icons here and there. A couple of major additions will have to be pushed to a later upgrade - they're needing more time/energy than I have at the moment (in particular making the summary text get included in a TweetMe function that I'm planning on incorporating).
Logged

nukpana

  • Hero Member
  • *****
  • Karma: 71
  • Posts: 663
Re: [THEME] Looking for interested beta testers
« Reply #42 on: September 08, 2011, 01:33:07 PM »

That's ok.  I can explain:

Code: (http://snewscms.com/forum/index.php?topic=10296.msg68387#msg68387) [Select]
array_slice(explode(',', l('cat_listSEF')), 3);
This line makes the cat_listSEF into an array and removes the first 3 values - archive, contact, sitemap - leaving only the login page, then when logged in, all of the admin pages.  The rest is a checker against the categorySEF variable and the action query.  If you want to exclude login in the admin page check, then make the function parameter to TRUE - as noted in the above example.  

Screenshot of the example using a admin/public sidebar - just like this theme:

Admin Page


Public page


Code for the above example:
Code: (index.php Exceprt) [Select]
<div id="side">
<?php // EQ add 
if(is_admin(TRUE)) { admin_sidebar(); } else { ?>

<div class="single">
<h3>Categories</h3>
<ul>
<?php categories(); ?>
</ul>
<h3>RSS Feeds</h3>
<ul>
<?php rss_links(); ?>
</ul>
<?php extra(); ?>
</div>

<div class="single">
<h3>New Posts</h3>
<ul>
<?php menu_articles(0,3,1); ?>
</ul>
<h3>New Comments</h3>
<ul>
<?php new_comments(5,30); ?>
</ul>
</div>
<?php // EQ Add

?>

</div>

If you copied the example as is, it shouldn't effect the login page nor the current class.

* I am just reading about the tragedy now.



*** EDIT ** Btw the full code I used is here for the main template for anyone to use:

snews.php edit:
Code: [Select]
// Add process, editcomment to cat_listSEF
if (_ADMIN) {$l['cat_listSEF'] .= ',administration,admin_category,admin_article,article_new,extra_new,page_new,snews_categories,snews_articles,extra_contents,snews_pages,snews_settings,snews_files,logout,groupings,admin_groupings,editcomment,process';}

New file called mod.admin-menus.php
Code: (mod.admin-menus.php) [Select]
<?php

function 
admin_menu_styles() {
?>

<style>
#toolbar{float:right;}
#toolbar ul li{display:inline;position:relative;}
#toolbar ul li ul.subnav{display:none;background:#eee;left:0;position:absolute;top:25px;width:312px;margin:0;padding:0;}
#toolbar ul li ul.subnav li{border-bottom:1px solid #ccc;float:left;width:292px;padding:5px 0;}
#toolbar ul li ul.subnav li:last-child{border:none;}
</style>
<?php
}
function admin_menu_script() {
?>

<script>
// Source: Sitepoint book "Simply Javascript"
// Modified for use with the document object
document.getElementByClass = function(theClass) {
var elementArray = [];
if (typeof document.all != "undefined") {
  elementArray = document.all;
} else {
  elementArray = document.getElementsByTagName("*");
}
var matchedArray = [];
var pattern = new RegExp("(^| )" + theClass + "( |$)");
for (var i = 0; i < elementArray.length; i++) {
  if (pattern.test(elementArray[i].className)) {
  matchedArray[matchedArray.length] = elementArray[i];
}
  }
  return matchedArray;
};

// Toggle Functions
// Source modified from http://bonrouge.com/~togglit
document.write('<style type="text/css">.clicker { cursor:pointer; }</style>');

function toggleNext(elm) {
var next = elm.nextSibling;
while ( next.nodeType != 1 ) {
next = next.nextSibling;
}
next.style.display = (
(next.style.display=="none")
? "block"
: "none"
);
}

function toggleEl(elm) {
var clss = "clicker";
elm.className += " " + clss;
elm.onclick = function(e) {
e.preventDefault();
toggleNext(this);
}
toggleNext(elm);
}

window.onload = function() {
var toggle = document.getElementByClass("toggle");
for (var i in toggle) {
toggleEl( toggle[i] );
}
};
</script>
<?php
}

function is_admin($exclude_login FALSE)  {
global $categorySEF;
$sys_pages array_slice(explode(','l('cat_listSEF')), 3);
if( _ADMIN ) {
if( 
in_array($categorySEF$sys_pages
||  in_array($_GET['action'], $sys_pages
) {
return TRUE;
}
} else {
if( $exclude_login === FALSE ) {
return in_array($categorySEF$sys_pages);
}
}
}

function admin_sidebar() {
$q 'select 
(select count(id) from '
._PRE.'categories where published = "YES") as cat_count, 
(select count(id) from '
._PRE.'articles where position = 1 and published = 1) as art_count, 
(select count(id) from '
._PRE.'articles where position = 2 and published = 1) as extra_count,
(select count(id) from '
._PRE.'articles where position = 3 and published = 1) as page_count, 
count(id) as group_count from '
._PRE.'extras';
$res mysql_query($q);
$stat mysql_fetch_assoc($res);

$link ' '.l('divider').' <a href="';
$catView  $stat['cat_count'] > $link.'snews_categories/">'.l('view').'</a>' '';
$art_new  $stat['cat_count'] > '<a class="subcat" href="article_new/">'.l('add_new').'</a>' l('create_cat');
$artView  $stat['art_count'] > $link.'snews_articles/">'.l('view').'</a>' '';
$pageView $stat['page_count'] > $link.'snews_pages/">'.l('view').'</a>' '';
$groupView $stat['group_count'] > $link.'groupings/">'.l('view').'</a>' '';
$extraView $stat['extra_count'] > $link.'extra_contents/">'.l('view').'</a>' '';

echo '
<h3>Category Admin</h3>
<a class="subcat" href="admin_category/">'
.l('add_new').'</a>
'
.$catView.'

<h3>Article Admin</h3>
'
.$art_new $artView.'

<h3>Page Admin</h3>
<a class="subcat" href="page_new/">'
.l('add_new').'</a> 
'
$pageView .'

<h3>Extras Admin</h3>
Extra Contents<br />
<a class="subcat" href="extra_new/">'
.l('add_new').'</a> '$extraView .'
'
;
if (s('enable_extras') == 'YES') {
echo '<br />
Extra Grouping<br />
<a class="subcat" href="admin_groupings/">'
.l('add_new').'</a> '.$groupView.'
'
;
}
}
function admin_toolbar() {
if(_ADMIN) { 
$q_comm 'select 
c.id, c.articleid, c.name, c.comment, a.title as articleTitle 
from '
._PRE.'comments as c 
left outer join '
._PRE.'articles as a 
on c.articleid = a.id 
where c.approved != "True"'
;
$result_comm mysql_query($q_comm);
$unapproved mysql_num_rows($result_comm);

?>

<div id="toolbar">
<ul>
<?php
if ($unapproved 0) {
echo '<li><a href="administration/" class="toggle">'.l('unapproved').'</a><ul class="subnav">';
while ($r mysql_fetch_array($result_comm)) {
if (strlen($r['comment']) > '60') {
$r['comment'] = substr($r['comment'],0,60).'...';

echo '
<li>'
.$r['name'].' (<strong>'.$r['articleTitle'].'</strong>)<br />
<span class="comment_preview">"'
.$r['comment'].'"</span><br />
<a href="'
._SITE.'?action=editcomment&amp;commentid='.$r['id'].'">'.l('edit').'</a> '.l('divider').' <a href="'._SITE.'?action=process&amp;task=deletecomment&amp;commentid='.$r['id'].'" title="'.l('delete').' '.l('comment').'" onclick="return pop()">'.l('delete').'</a></li>';

}
echo '</ul></li>';

}
?>

<li><a href="snews_settings/"><?php echo l('settings'); ?></a></li>
<li><a href="snews_files/"><?php echo l('files'); ?></a></li>
<li><a href="logout/" title="<?php echo l('logout'); ?>"><?php echo l('logout'); ?></a></li>
</ul>
</div>
<?php }
}

?>

index.php
Code: [Select]
<?php
/*------------------------------
   sNews 1.7.1 - Template file
--------------------------------*/
// Include all system function files here
include('snews.php');

// EQ Add
include('mod.admin-menus.php');
//--------------------------------------------
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<?php title(); ?>
<meta name="robots" content="index,follow" />
<meta name="author" content="Solucija.com" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<?php admin_menu_styles(); ?>
</head>
<body>
<div id="wrapper">
<div id="header">
<div id="top">
<ul id="topmenu">
<?php pages(); ?>
</ul>
<div id="search">
<?php searchform(); ?>
</div>
</div>
<div id="logo">
<h1><?php echo s('website_title'); ?></h1>
<p><?php echo s('website_description'); ?></p>
</div>
</div>
<div id="crumbs">
<?php breadcrumbs(); ?>
<?php // EQ Add 
admin_toolbar(); 
?>

</div>
<div id="content">
<div id="main">
<?php center(); ?>
</div>

<div id="side">
<?php // EQ add 
if(is_admin(TRUE)) { admin_sidebar(); } else { ?>


<div class="single">
<h3>Categories</h3>
<ul>
<?php categories(); ?>
</ul>
<h3>RSS Feeds</h3>
<ul>
<?php rss_links(); ?>
</ul>
<?php extra(); ?>
</div>

<div class="single">
<h3>New Posts</h3>
<ul>
<?php menu_articles(0,3,1); ?>
</ul>
<h3>New Comments</h3>
<ul>
<?php new_comments(5,30); ?>
</ul>
</div>
<?php // EQ Add

?>

</div>
</div>
<div id="footer">
<p>This site is powered by <a href="http://snewscms.com/" title="sNews CMS" onclick="target='_blank';">sNews</a> | <?php login_link(); ?></p>
</div>
</div>
<?php admin_menu_script(); ?>
</body>
</html>
« Last Edit: September 09, 2011, 04:59:58 AM by nukpana »
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: [THEME] Looking for interested beta testers
« Reply #43 on: September 08, 2011, 03:08:51 PM »

My fault, I didn't see the instruction about 'if (is_admin()) {' - i.e when used right the login page doesn't show. Class "current" does get screwed though, but that may well be down to my usage.

Or that I'm blind...
("blind" = stupid of course...)
« Last Edit: September 08, 2011, 03:32:15 PM by Fred K »
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: [THEME] Looking for interested beta testers
« Reply #44 on: September 12, 2011, 02:20:05 AM »

Test period is concluded. A big thanks to everyone who gave feedback and helped solve problems. Release is imminent, more info to follow in the next day or so.
Cheers.
Logged
Pages: 1 2 [3]