xuefang
Forum Replies Created
-
Forum: Networking WordPress
In reply to: user registration & login on mapped domains in multisiteI see… Well I’ll never learn if I don’t ‘play’ or hack. If there’s a plugin notes/doc I can refer to, I’ll certainly follow the notes/instruction. As it stand, I’ll just leave things as they’re (& learning stops).
Thanks for you help.
CherForum: Networking WordPress
In reply to: user registration & login on mapped domains in multisiteOK did the change. Now I have a plugin Cher’s WP Hide Dashboard and also the un-activated ‘old’ WP Hide Dashboard. What I did was, I ‘delete’ the plugin entries and also check that no such folder in the plugin directory. Then I copied the WP Hide Dashboard folder (with the changed file) to the plugin directory. Somehow the ‘old’ WP Hide Dashboard reappeared.
I am missing something again.
What are the sequence of steps?
Thanks,
CherForum: Networking WordPress
In reply to: user registration & login on mapped domains in multisiteOH! I did not remove the header.
I copied the file to another name and then edited it and then rename it to the same name.
Thks,
CherForum: Networking WordPress
In reply to: user registration & login on mapped domains in multisiteOh! I didn’t change the header data. It’s my first hack of a plugin.
I removed all codes that I do not need. This is the content of WP Hide Dashboard.
Where is the header data?
Thanks.<?php /* Plugin Name: WP Hide Dashboard Plugin URI: https://kpdesign.net/wphidedash/ Description: A simple plugin that removes the Dashboard menu, the Personal Options section and the Help link on the Profile page, hides the Dashboard links in the admin bar menu (if activated), and prevents Dashboard access to users assigned to the <em>Subscriber</em> role. Useful if you allow your subscribers to edit their own profiles, but don't want them wandering around your WordPress admin section. <strong>Note: This version requires a minimum of WordPress 3.1. If you are running a version less than that, please upgrade your WordPress install now.</strong> Author: Kim Parsell Author URI: https://kpdesign.net/ Version: 2.1 License: MIT License - https://www.opensource.org/licenses/mit-license.php Copyright (c) 2008-2011 Kim Parsell Personal Options removal code: Copyright (c) 2010 Large Interactive, LLC, Author: Matthew Pollotta Originally based on IWG Hide Dashboard plugin by Thomas Schneider, Copyright (c) 2008 (https://www.im-web-gefunden.de/wordpress-plugins/iwg-hide-dashboard/) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* Disallow direct access to the plugin file */ if (basename($_SERVER['PHP_SELF']) == basename (__FILE__)) { die('Sorry, but you cannot access this page directly.'); } /* Plugin config - user capability for the top level you want to hide everything from */ $wphd_user_capability = 'edit_posts'; /* [default for Subscriber role = edit_posts] */ /* WordPress 3.1 introduces the admin bar in both the admin area and the public-facing site. For subscribers, there's also now a pesky link to the Dashboard and a redundant link to the user's profile in the My Account menu. Let's remove the Dashboard link and only show the Profile link on the site. */ /* There's also an admin bar menu in WordPress Multisite that lists all of the network sites that a user belongs to, which includes links to each site's Dashboard. Let's remove the default menu and create one of our own that only links to the sites a user belongs to. */ /* Now for the admin sidebar menu and the profile page. Let's hide the Dashboard link, Help menu, Favorites menu, Upgrade notice, and the Personal Options section. */ function wphd_hide_dashboard() { global $blog, $current_user, $id, $parent_file, $wphd_user_capability, $wp_db_version; if ($wp_db_version < 17056) { return; } else if ((!current_user_can(''.$wphd_user_capability.'') || !current_user_can_for_blog($blog->userblog_id, ''.$wphd_user_capability.'')) && $wp_db_version >= 17056) { /* First, let's get rid of the Help menu, update nag, Personal Options section */ echo "\n" . '<style type="text/css" media="screen">#your-profile { display: none; } .update-nag, #screen-meta, .color-option, .show-admin-bar { display: none !important; }</style>'; echo "\n" . '<script type="text/javascript">jQuery(document).ready(function($) { $(\'form#your-profile > h3:first\').hide(); $(\'form#your-profile > table:first\').hide(); $(\'form#your-profile\').show(); });</script>' . "\n"; /* Now, let's fix the sidebar admin menu - go away, Dashboard link. */ /* If Multisite, check whether they are in the User Dashboard before removing links */ $user_id = get_current_user_id(); $blogs = get_blogs_of_user($user_id); if (is_multisite() && empty($blogs)) { return; } else if (function_exists('remove_menu_page')) { remove_menu_page('index.php'); /* Hides Dashboard menu in 3.1 */ remove_menu_page('separator1'); /* Hides arrow separator under Dashboard link in 3.1*/ remove_submenu_page('profile.php', 'profile.php'); /* Hides Profile submenu link in 3.1. Really don't need to see it twice, do we? */ } /* Last, but not least, let's redirect folks to their profile when they login or if they try to access the Dashboard via direct URL */ if (is_multisite() && empty($blogs)) { return; } else if ($parent_file == 'index.php') { if (headers_sent()) { echo '<meta http-equiv="refresh" content="0;url='.admin_url('profile.php').'">'; echo '<script type="text/javascript">document.location.href="'.admin_url('profile.php').'"</script>'; } else { wp_redirect(admin_url('profile.php')); exit(); } } } } add_action('admin_head', 'wphd_hide_dashboard', 0); /* That's all folks. You were expecting more? */ ?>
Forum: Networking WordPress
In reply to: user registration & login on mapped domains in multisiteSure. The screen shot is at https://jollyvip.com/plugin-snapshot/
I don’t know how to post the image here.
Thanks again,
CherForum: Networking WordPress
In reply to: user registration & login on mapped domains in multisiteHi Mike,
Oh! I can’t remember. Most likely via FTP & then when I saw the duplicate entries I tried to delete via wp-admin.
What should I do now? I still got 2 entries in wp-admin/pluginsThanks again,
CherForum: Networking WordPress
In reply to: user registration & login on mapped domains in multisiteThanks Mike.
I’ve now used a (hacked) copy of WP Hide Dashboard as I’ve also installed Custom Admin Bar plugin.
Maybe my query for #1 is not clear.
I noticed the cookie thing (esp. on IE). However what I wanted was a login plugin for multisite which is not in a ‘form’ display. For now I’ve hacked the WPMS Sidebar Login Widget (as the ‘create new account didn’t work for me) but I am not declaring it fully ‘tested’. Still looking for a multiside login plugin that allows the same behaviour as in single site installation.BTW how do I get rid of ‘redundant’ plugins? I must admit I forgot to deactivate before I hacked/changed files in the plugin folder. I see 2 entries (same version) of the plugin I’ve changed in my plugin list.
Many thanks again,
CherForum: Networking WordPress
In reply to: Dashboard Multisite subdomains not workingOoops. Here’s the dashboard snapshot at https://jollyvip.com/dashboard-for-subscriber/
Many thanks,
CherForum: Networking WordPress
In reply to: Dashboard Multisite subdomains not workingHi,
I am new to multisite.
I’ve created a multisite domain at https://www.jollyvip.com (primary) and moved my WP blogs to this multisite.I called the moved WP blogs sub-blogs/sites. Most of these are domain mapped to subdirectories and seems to be working.I have two issues; Not sure whether they are related in terms of site re-direction and registration & login.
1) the dashboard for the sub-blogs for the subscriber (registered account user) has ‘blank’ screen i.e. not all the dashboard modules are feeding through to the sub-blogs subscriber dashboard. See attached image.2) I use Multisite user registration manager v2.1.2 by Zaantar.
The registration works fine.
I tried to use the plugin WPMS Sidebar Login widget and also the WP Sidebat Login, both gave me issues, hence I’m using the Multisite user registration manager.
However, I’ve not found a multisite login plugin (just login & no registration) that I can use with the Multisite user registration manager.
Anyone has a plugin that just allow login/logout from user subscriber site (not login from the primary site)?
Currently I am using a login template provided by suffusion theme (as I have 2 blogs using this template and it works fine for these sites in multisite but not for non-suffusion sites).I have not tweaked any files (i.e. .htaccess or config)
Many thanks,
CherForum: Themes and Templates
In reply to: [Twenty Eleven] [Theme: Twenty Eleven] Leave A Reply FormThanks again Rev.Voodoo.
I suspect (most) folks who are using this theme are not aware that their sites are not showing ‘as is’ on mobile browsers. One should not have to hack or fiddle/configure the Menu display – which draws the line for me. Hence I switched to a different theme.
Yeah..spending yet more time in setting it all up again..twentyeleven is definitely not for me after having hacked to get the image slider to work and then to find that the Menu and tables are not showing ‘as is’ on mobile browsers – this I consider as ‘non-responsive’ features of twentyelevent. Surely one should not have to do a child theme for the Menu too…I have built 2 other WordPress sites and I have to admit doing this 3rd site (using the twentyeleven) took more time than I have planned for.
Good luck with your theme and let me know when you’re done with, also keen to find ‘great themes’!Forum: Themes and Templates
In reply to: [Twenty Eleven] [Theme: Twenty Eleven] Leave A Reply FormThanks Rev.Voodoo.
Ok. However I find that a table didn’t display on the mobile browser.
So I do not know how this will work if I will to have pages with tables etc..
I think one would expect the Menu to appear as ‘it is’ rather than being wrapped round on mobile browser which is the case with this theme.I suspect others who use this theme probably don’t have tables or Menu items more than 3 items or they don’t care about mobile display etc.
Anyway I have now installed a different theme.
Thanks.Forum: Themes and Templates
In reply to: [Twenty Eleven] [Theme: Twenty Eleven] Leave A Reply FormThanks mimacdonald. Yes it will take a considerable amount of time and effort to look into child themes which I don’t have right now.
I have hacked the theme too and have now installed a difference theme. BTW what is your website? I want to see if it loads ok on mobile.Mine didn’t load (with the twentyeleven) ok on mobile
ta,
CherForum: Themes and Templates
In reply to: TwentyEleven Browser ResizeSorry I didn’t realise I was interrupting this thread. I posted here and then found another thread after posting here.
Sure I can start another thread.
Thanks.Forum: Themes and Templates
In reply to: TwentyEleven Browser ResizeHello,
I am confused as to what the responsive structure do as my site https://www.iadrsolutions.com is not loading ‘responsively’ on mobile screen.
Any suggestions are welcome.
thanks,
CherForum: Themes and Templates
In reply to: [Twenty Eleven] [Theme: Twenty Eleven] Leave A Reply FormHello,
I used the twentyeleven theme and spent hours hacking it to get to what I want. However I found out that my site https://www.iadrsolutions.com is not displaying ‘the same’ (as via big screen browsers) on safari on smartphone.
This is rather annoying especially as the theme is ‘supposed’ to be customised for small screens.
Am I the only one having such problem?
Thanks,
Cher