Law
Forum Replies Created
-
Forum: Plugins
In reply to: [Asgaros Forum] Hide New topic button on parent forumHi,
I’ve found a solution (I’m not developper so sorry if that’s not an optimal code). Maybe useful as a quick and dirty solution !
Feel free to make it better or propose another solution.The change takes place in includes > forum.php :
// Generate forum menu
function showForumMenu() {
$menu = ”;// Add below : currentpage, words, and detect
// currentpage : URL of the parent page of the forum where to hide the New Topic button
// words : Words to identify in the URL of the current page (specify a very unique string)
// detect : Condition checking that “words” is present in the URL of the page$currentpage = $_SERVER[‘REQUEST_URI’] ;
$words = ‘blah-blah’;
$detect = strpos($currentpage, $words);if ($this->forumIsOpen()) {
// If “blah-blah” not found in the URL, so the New Topic button has not to be hidden (we insert : $detect === false)
if ((is_user_logged_in() && !$this->permissions->isBanned(‘current’) && $detect === false) || (!is_user_logged_in() && $this->options[‘allow_guest_postings’])) {
$menu .= ‘<div class=”forum-menu”>’;
$menu .= ‘get_link(‘addtopic’, $this->current_forum).'”>’;
$menu .= ‘<span class=”menu-icon fas fa-plus-square”></span>’;
$menu .= __(‘New Topic’, ‘asgaros-forum’);
$menu .= ‘‘;
$menu .= ‘</div>’;
}// Add this “else” : If “blah-blah” is found in the URL, so the New Topic button has not to be displayed
else {
$menu .= ‘<div class=”forum-menu”>’;
$menu .= ‘</div>’;
}}
Forum: Plugins
In reply to: [Asgaros Forum] Using a shortcode from another plugin to hide forum contentHello,
Thank you for your reply. I just copy below a piece of code from forum-editor.php file.
I hope the interesting part for my need is in these lines of code.So, with :
echo do_shortcode(‘[swpm_protected for=”2-3″]’.$output.‘[/swpm_protected]’);May I replace $output by $editor_view to hide the content editor for example ?
I want to hide every parts from the title to the submit button, so which value do I have to consider ?Then, where to place it in the below code ? I hope you can help me about that, I am touching my goal.
Best regards,
Law—————-
<form id=”forum-editor-form” class=”<?php echo $editor_view; ?>-editor” tabindex=”-1″ name=”addform” method=”post” action=”<?php echo $actionURL; ?>” enctype=”multipart/form-data”<?php if ($inOtherView && !isset($_POST[‘subject’]) && !isset($_POST[‘message’])) { echo ‘ style=”display: none;”‘; } ?>>
<div class=”title-element”><?php if ($inOtherView) { echo $editorTitle; } ?></div>
<div class=”editor-element”>
<?php if ($editor_view === ‘addtopic’ || ($editor_view == ‘editpost’ && $this->asgarosforum->is_first_post($post->id))) { ?>
<div class=”editor-row-subject”>
<label for=”subject”><?php _e(‘Subject:’, ‘asgaros-forum’); ?></label>
<span>
<input class=”editor-subject-input” type=”text” id=”subject” maxlength=”255″ name=”subject” value=”<?php echo esc_html(stripslashes($subject)); ?>”>
</span>
</div>
<?php
}echo ‘<div class=”editor-row no-padding”>’;
wp_editor(stripslashes($message), ‘message’, $this->asgarosforum->options_editor);
echo ‘</div>’;$this->asgarosforum->uploads->show_editor_upload_form($post);
$this->asgarosforum->notifications->show_editor_subscription_option();
do_action(‘asgarosforum_editor_custom_content_bottom’, $editor_view);echo ‘<div class=”editor-row editor-row-submit”>’;
if ($editor_view === ‘addtopic’) {
echo ‘<input type=”hidden” name=”submit_action” value=”add_topic”>’;
} else if ($editor_view === ‘addpost’) {
echo ‘<input type=”hidden” name=”submit_action” value=”add_post”>’;
} else if ($editor_view === ‘editpost’) {
echo ‘<input type=”hidden” name=”submit_action” value=”edit_post”>’;
}echo ‘<div class=”left”>’;
if ($inOtherView) {
echo ‘‘.__(‘Cancel’, ‘asgaros-forum’).’‘;
} else {
if ($editor_view === ‘editpost’) {
$actionURL = $this->asgarosforum->get_link(‘topic’, $this->asgarosforum->current_topic);
}
echo ‘‘.__(‘Cancel’, ‘asgaros-forum’).’‘;
}
echo ‘</div>’;
echo ‘<div class=”right”><input class=”button button-normal” type=”submit” value=”‘.__(‘Submit’, ‘asgaros-forum’).'”></div>’;
echo ‘</div>’;
echo ‘</div>’;
echo ‘</form>Forum: Plugins
In reply to: [WordPoints] Top table – Link to each listed userHi everyone,
Coud you help me about this question please ?
Thanks
RegardsForum: Plugins
In reply to: [Nextend Social Login and Register] Connexion on Mobile is KOSolution of my problem :
1/ Create a new empty page and then select it as “OAuth redirect uri proxy page” at Nextend Social Login>Global Settings>General tab.
In this way the Oauth flow would be handled on the specified page instead of the /wp-login.php.If you have a privacy policy or you as a extra information before the login, the you probably want to create another page and insert the shortcode: [nextend_social_login_register_flow] into it then select it as “Page for register flow”.
2/ This setting will modify your redirect uri so you will need to add the new Redirect uri to each of your configured Apps. You will most likely receive a notification about this like:
Nextend Social Login detected that your login url changed. You must update the Oauth redirect URIs in the related social applications.
Fix Error – Oauth Redirect URIForum: Plugins
In reply to: [Nextend Social Login and Register] Connexion on Mobile is KOThank you so much Laszlo Szalvak !
It works !Forum: Plugins
In reply to: [Nextend Social Login and Register] Connexion on Mobile is KOHi @laszloszalvak
Thanks, I just created a new ticket, but I have no #TicketRef to follow.
I just got a confirmation email.Regards,
Laurent