jgoldbloom
Forum Replies Created
-
Forum: Plugins
In reply to: [Asgaros Forum] Using Hooks and FiltersAs to UM profile link from the Asgaros generated author name that would require either the plugin author to add an option, or you could use jQuery to wrap an anchor around the selector as a not so great workaround.
But you could much more easily use the method noted above and add into your hook a nicely style a text link/button/image (whatever) that points to the slug setup in UM for your profile page. I posted that method to show the power of the hook system but this reply should get you going.
Forum: Plugins
In reply to: [Asgaros Forum] Using Hooks and FiltersHey, I happen to use Ultimate Member and added below to functions.php to exploit the massively cool and useful Asgaros hooks/filters. Modify then style accordingly, but that’s production code using UM functions to add post author details based on UM meta in the profile form plus login/register link at the top of Asgaros based on UM forms as well:
/* BEGIN: CDSN PLUGIN HOOKS OR THEME HOOKS - JG 2/10/2017 Asgaros plugin hooks to add forum disclaimer detail (html) in various areas... See https://www.ads-software.com/plugins/asgaros-forum/faq/ */ function cdsnForumAuthorInfo($author_id) { if ($author_id) { um_fetch_user($author_id); $content="<div class='cdsnProfileWrapper'>"; $data=um_user('type'); $typeHere=$data[0]; $content.="<div class='cdsnProfileTypeHere'>$typeHere</div>"; $user_info = get_userdata($author_id); foreach ($user_info->roles as $role) { $role_arr[]=ucfirst($role); } $roles=implode(', ', $role_arr); $content.="<div class='cdsnProfileRoles'>($roles)</div>"; $content.="<div class='cdsnProfileGenderFlagWrapper'>"; $content.="<span class='cdsnProfileGender'>".cdsnGetGender(um_user('gender'))."</span>"; $content.="<span class='cdsnProfileFlag'>".cdsnGetCountryFlag(um_user('country'))."</span>"; $content.="</div>"; $cancerType=um_user('cancer'); if ($cancerType!=='N/A' && !empty($cancerType)) { $content.="<div class='cdsnProfileCancer'>$cancerType</div>"; $diagnosed=um_user('diagnosed'); if ($diagnosed!=='N/A' && !empty($diagnosed)) { $content.="<div class='cdsnProfileDiagnosed'>Diagnosed $diagnosed</div>"; } } $content.=" <a href='#cdsnProfileCancerBio' title='Cancer Bio...'> <span class='cdsnProfileCancerBioButton'> <img src='/cdsn-images/profiles/cancerbio.gif' alt='Cancer Bio...' /> Cancer Bio</span> </a>"; $content.="</div>"; $content.="<div class='cdsnProfileCancerBio'>".um_user('cancerbio')."</div>"; echo $content; } } function cdsnForumLoginRequired($message) { return "<p><br />• You must <a href='/login' title='Login...'>log in</a> or <a href='/register' title='Register as a new member...'>register</a> to contribute to our forum...<br /></p>"; } function cdsnForumLoginErrorMessage($message) { return ''; } add_filter('asgarosforum_filter_login_message', 'cdsnForumLoginRequired'); add_filter('asgarosforum_filter_error_message_require_login', 'cdsnForumLoginErrorMessage'); add_action('asgarosforum_after_post_author', 'cdsnForumAuthorInfo',10,1); /* END: ALL CUSTOM CDSN HOOKS - JG */
Looks like this:
Forum: Plugins
In reply to: [Asgaros Forum] Stats in mobile viewJust a quick reminder please also account for tablet I.e. iPad ??
Forum: Plugins
In reply to: [Asgaros Forum] Category media/editor text area does not save/updateBTW the Yoast SEO plugin added the category description field, when plugin disabled it renders like your screenshot. FYI if others experiencing the same.
Forum: Plugins
In reply to: [Asgaros Forum] Category media/editor text area does not save/updateThe coming new admin changes are exciting, so since you’re combining cats/forums in the UI please also consider drag/drop re-ordering including parent/child relationship (forums in cats, sub-forums in forums) which is how menus are setup in WP and a common technique by plugin authors. If this is part of the plan, awesome.
As to clarifying my cat/forum header concept I wish to emphasize optional image banners was my main focus to producing an elegant UX. But I feel cat/forums should include another choice, an HTML description textarea, i.e. one or the other. In whatever combination you opt to permit in setup, these should render below the cat/forum title.
I am aware you want to maintain a small footprint overall for the code base, so not all feature requests from the masses will be implemented. This request, I feel, will not bloat code and enhance the look/feel while using common algorithms in WP like media library integration for banner images and exploiting existing WP database schemas as I noted in an earlier comment.
As a fellow developer I appreciate, as always, your ear and responsiveness to your end users.
Forum: Plugins
In reply to: [Asgaros Forum] Category media/editor text area does not save/updateAh, my category screen is different likely due to either the Panoramic theme extended plugins or some other plugin. Ugh, the rogue plugin search begins!
I wish to point out, respectfully, other plugins I use which create categories for their own purposes show fields relevant to that plugin – and built to use WP core functionality and DB. Thus I am surprised but don’t place blame of any kind on Asgaros, for the record so this is my pain.
Before you mark as resolved have you considered adding a category header feature that allows optional media like an image banner via the media library, or a description field like a forum? ??
With extreme respect and thanks,
Jim
Forum: Plugins
In reply to: [Asgaros Forum] Stats in mobile viewExcellent and thank you very much!
Forum: Plugins
In reply to: [Asgaros Forum] Technical help for my forumWhat works for me is the Ultimate Member plugin where I define login/logout permalinks and created user profile fields that can very easily be embedded into your forum author info via Asgaros hooks, example code in functions.php:
/* Asgaros plugin hooks to add forum disclaimer detail (html) in various areas... See https://www.ads-software.com/plugins/asgaros-forum/faq/ */ function cdsnForumAuthorInfo() { um_fetch_user( get_current_user_id() ); echo "<br /><div>Gender:".um_user('gender')."</div>"; echo "<div>Country:".um_user('country')."</div>"; echo "<div>Bio:".um_user('description')."</div>"; } function cdsnForumLoginRequired($message) { return "<p><br />• You must <a href='/login' title='Login...'>log in</a> or <a href='/register' title='Register as a new member...'>register</a> to contribute to our forum...<br /></p>"; } add_filter('asgarosforum_filter_login_message', 'cdsnForumLoginRequired'); function cdsnForumLoginErrorMessage($message) { return ''; } add_filter('asgarosforum_filter_error_message_require_login', 'cdsnForumLoginErrorMessage'); // Action hooks... add_action('asgarosforum_after_post_author', 'cdsnForumAuthorInfo');
The um_user() function returns the profile fields I setup in Ultimate Member, get the idea Then style accordingly as the previous poster here did. EASY.
??
Forum: Themes and Templates
In reply to: [Panoramic] Overlay text incomplete in mobile viewFollowup, running 10.0.20/Premier with child theme:
In styes.css this exists:
@media screen and (max-width: 899px) { ... .header-image .overlay .opacity p, .slider-container.default .slider .slide .overlay .opacity p { display: none; } }
Requests:
1) Show the P tags
2) Add overlay action button support in theme header image options after text, button label, link, link title attribute, and background/border color/size. The theme should control resizing fonts etc. via media queries but please avoid !important in the styling attributes to allow override.
3) Allow options to individually hide any overlay element in mobile viewI accomplished all this by embedding anchor links for my own action button in the p tag and styled accordingly in my child theme complete with a media query override, looks great responsuvely.
My point is this would be a great feature for the theme to simplify customization as not all admins are CSS gurus, and a cool feature to promote.
Thanks!
???
Forum: Plugins
In reply to: [Asgaros Forum] Friendly URL’sThanks, this is actually very important.
As to cyrillic characters and the other plugin noted in that older topic link as well as transliteration in general, I feel WP core should handle all aspects and not just sanitization of permalinks/slugs. Must drive plugin authors crazy! Short of that, have you considered bypassing plugins like cyr2lat or bloating your code base and instead managing links very simply like this:
/forum-slug/view-category/12
/forum-slug/view-forum/13
/forum-slug/view-category/12/view-forum/13/view-topic/14
…etc…If you build the paths to match the breadcrumb trail and create simple slugs appended with ID’s this would satisfy the concerns expressed earlier about query strings and not rely on transliteration issues with MB character sets. Of course the better SEO approach would be including text instead of ID’s but just posing an alternative.
Whatever you decide, thanks for the info and discussion.
Forum: Plugins
In reply to: [Asgaros Forum] How to Login to Comment?Hmmm… Maybe take a look at Yoast SEO plugin for further inspiration and possible advanced integration as you build? Cool and very popular plugin to help you maintain Asgaros’ wonderfully small footprint. Just thinking out loud…
Forum: Plugins
In reply to: [Asgaros Forum] in my humble opinionRE: “As far as I understand you want me to add registration/login forms directly to the forum page. At the moment I dont want to do this because WordPress already comes with their own registration/login forms…”
Absolutely.
To the OP I use the Ultimate Member plugin which allows its own login/registration forms with shortcodes you could add to the page used for displaying Asgaros. The key being a simple short code to display a form without involving the Asgaros developer or code.
Another option is to modified the theme’s function.php with the Asgaros hooks to simply add Links to login/reg in the forum without any forum code base changes (noting my links come from Ultimate Member setup):
function cdsnForumLoginRequired($message) {
return “<p><br />• You must log in or register to contribute to our forum…<br /></p>”;
}
add_filter(‘asgarosforum_filter_login_message’, ‘cdsnForumLoginRequired’);function cdsnForumLoginErrorMessage($message) {
return ”;
}
add_filter(‘asgarosforum_filter_error_message_require_login’, ‘cdsnForumLoginErrorMessage’);Forum: Plugins
In reply to: [Asgaros Forum] How is Mobile Device Determined?Forgot to mention:
@media only screen
and (max-device-width: 768px) { … }I find setting to screen only and max-DEVICE-width targets mobile devices vs. just screen width alone and prevents interference with other media types such as specially printed print styles, etc. if exists. ??
Forum: Plugins
In reply to: [Asgaros Forum] How is Mobile Device Determined?FYI – I use Chrome with the User Agent Switcher extension and can set to whatever mobile device desired and then use Chrome’s built in inspection tool to set desktop vs. mobile view and resize that inner window to test screen widths such as phone, tablet or whatever your media queries/breakpoint set.
Note: The extension allows you to test on desktop or laptop device for rapid development/testing (on a dev site for example which is wise) without requiring an actual mobile device until final user acceptance testing on live site.
Forum: Plugins
In reply to: [Asgaros Forum] Forum stats not showing in mobile viewExcellent, thank you.
Followup:
FYI – After removing !important from the default style in your mobile.css I adjusted my own forum stats CSS in my theme as shown below which takes into account a workable display attribute, adjustable widths, and also disabling the right most element border when stats wrap in mobile view:
#af-wrapper #statistics .statistics-element {
width: 22%;
display: inline-block;
border-right: 1px solid silver;
margin: 12px 0 12px 0;}
#af-wrapper #statistics .statistics-element:last-child {
border-right: none;
}(Have not seen your dev, but above works nicely for me if you plan on doing something similar in 1.4 stable) ??