Home User profile
tagDiv Member
This user did not write anything. So we are just showing here some random text to make the profile page look nice :)
kstockl
tagDiv Member

Hi again.
Why I asked for modification in Newspaper Theme 7.4 in this Thread?

To prevent unwanted Spam Users to Register. The inbuilt Login / Register function has no option for including Captchas or other Plugins to check if this is a real User. So for me it is to unsecure to use this function.

After a long ride a found a Solution which fullfills my needs when I modified the Code in following folder:
/Newspaper/parts/header/top-menu.php

Answer:

//show login widget (must be disabled in Theme : disabled Show SignIn/Join in NewspaperTheme in Header – TOP Bar
So I was able to prevent all the Modals which are used for Login/ Register / Login in Comments to open

//To show Logged-Out Users a Login/Register Link to my own Login/Register Page in Top-Bar

//To show logged-In Users their Avatar and a Logout Out Link in Top Bar

//To prevent unwanted Spam Users to register without verifying
cause Newspaper Modal has no option for including Captchas or other Security Plugins without heavy modifications

The modified Code can be viewed here:

Modified top-menu.php file

It activates the Login / Register Link in Top Bar Menu

Please note: In Mobil view the “Login/Register” or if a User is loggedIn the “Avatar/UserName/Logout” isn´t shown but it will do in Desktop View. And for my Users I have a seperate Login / Register / Account Page. So this isn´t really a problem.

Maybe in a Future Newspaper Update we get the possibility in Theme Setting to have a own setting for include a Url for: Login / SignIN – so that we don´t need to activate the Modal Login/Register if we have our own plugin which handles the Registration / Login of our users. But have the Login/Register | User Account/Logout Links displayed in Top-Bar Menu. In Desktop View and in Mobil View.

kstockl
tagDiv Member

@nano2408

Hi Nano2408 please try again. And try to reproduce the Issues you have discovered on my Site.I made a small modification while you stayed at my Site.

I think I found a more simple way for my Site. And I will give more details when I´m finised the Testings with modified Code.

Karl

kstockl
tagDiv Member

Sorry, 2 Code Inserts in the Forum seems not working:

So here again the Code I have changed:

Modal Login in Mobile View

  • This reply was modified 9 years by kstockl.
kstockl
tagDiv Member

@Catalin

Hi Catalin,
as I looked deeper now in the structure I discovered in mobile-menu.php the following Code:

<code> <!-- login section -->
        <?php if (td_util::get_option('tds_login_sign_in_widget') == 'show') { ?>
            <div class="td-menu-login-section">
                <?php
                if ( is_user_logged_in() ) {
                    locate_template('parts/logged.php', true);
                } else {
                    locate_template('parts/login.php', true);
                }
                ?>
            </div>
        <?php } ?>

I opened the File /parts/login.php an changed the code in following ways:

//if admin permits registration
$users_can_register_tab = '';

if ($users_can_register == 1) {
//add the Register tab to the modal window if
Anyone can register chec
$users_can_register_tab = ' <span></span>' . __td('Join', TD_THEME_NAME) . '';
}

echo '
<div class="td-guest-wrap">
<div class="td-menu-avatar"><div class="td-avatar-container">' . get_avatar($current_user->ID, 80) . '</div></div>
<div class="td-menu-login">' . __td('Sign in', TD_THEME_NAME) . '' . $users_can_register_tab . '</div>
</div>
';

This seems to work in Mobile View. Instead of showing now the Login Tab a Link now redirects to my own Login Page. The same with Join Tab – A unregistered User is redirected to the Register Page.

Can you confirm that my changed Code in Theme is free from Error?

And last but not least in Mobile View there is another Link I discovered within Login. If an User is logged out and he has to be logged In to write a Comment the Login View opens in a Modal Window in Mobile View.

In which file an where to change this part of Code to get redirected to my own Login Page instead of opening a Modal Window for Login?

Thanks for your reply

Greets, Karl

kstockl
tagDiv Member

Hi, me again
As I know have redirections for Login / Register in TOP-Bar-Menu and in comments I discovered that I have to redirect also the Login / Register in Smartphone View:

Smartohone View Responsive

When viewing on Smartphone there is also the Login /Register – here I want to redirect the Users to the Login page (Login ) and the register page (Join).

Where I am able to change this links in which file with which code?

Thank´s for your reply

With best Regards, Karl

kstockl
tagDiv Member

@Catalin

Hi Catalin, yes this works. Just replaced the code as you adviced 🙂

Thanks so much for your Support!

With best Regards,
Karl, Austria

kstockl
tagDiv Member

Forgot to ask for this Link modification when a User is already logged in!

When a User is logged in now, the Avatar and Name of the User ist shown in Top Bar Menu – and by default if the Users clicks on his Users Name he get redirected to his Authors Page ( /author/ ).

Where I am able to change the Code so that by clicking the Users Name the Link is redirecting to the Profile ( /wp-admin/profile.php) ?

I think this is my last question in this Thread 😀

Thank you for your reply
With best Regards, Karl

kstockl
tagDiv Member

@Andrei L.

I changed the Code and it is working like I want 🙂

TagDiv Team, thank´s again for your great Support!

With best Regards,
Karl

  • This reply was modified 9 years by kstockl.
kstockl
tagDiv Member

@Bogdan B.

Hi Bogdan, thank´s for the fast repsonse.

The Login/Register is working with my custom Link im TOP-BAR-MENU. (SHOW SIGN IN / JOIN). I just modified your Code because there was “class=” which was preventing the Link:

echo '<ul class="top-header-menu td_ul_login"><li class="menu-item"><a href="https://www.portal-regional.at/login/">Login / Registrieren</a><span class="td-sp-ico-login td_sp_login_ico_style"></span></li></ul>';

Maybe you can give me more advice for the Comments.php File. I don´t know what to do here. Sorry I´m not an experience Programmer, just a User 🙁

// login with our login modal when you want to write a comment

	        if (td_util::get_option('tds_login_sign_in_widget') == 'show') {
		        $url = '#login-form';
	        } else {
		        $post_id = get_the_ID();
		        $url = wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) );
	        }
            $defaults['must_log_in'] = '<p class="must-log-in td-login-comment"><a href="' . $url .'">' . __td('Log in to leave a comment', TD_THEME_NAME) . ' </a></p>';

            comment_form($defaults);
            //comment_form();

Do I have just to replace the following line?

$defaults['must_log_in'] = '<p class="must-log-in td-login-comment"><a href="' . $url .'">' . __td('Log in to leave a comment', TD_THEME_NAME) . ' </a></p>';

With this Line of Code?

$defaults['must_log_in'] = '<p class="must-log-in td-login-comment"><a href="https://www.portal-regional.at/login/">' . __td('Log in to leave a comment', TD_THEME_NAME) . ' </a></p>';

Thanks for your reply

With best Regards,
Karl

  • This reply was modified 9 years by kstockl.
kstockl
tagDiv Member

@Chris S

Sorry to be a little unclear in my last post. So again: When I follow your procedure:

a) delete old version of theme AND the included plugins via FTP
b) install new version of theme in theme folder via FTP
Here I meant: Via FTP I upload the renamed Theme in theme folder. The original Theme Name is “NEWSPAPER” Before I´m able to upload the Theme I have to unzip the Zipped Newspaper theme file. When I´m done with unzip I have the Mains Theme Folder “Newspaper” where all relevant Subfolders and files of these Theme are included.

I meant exactly to rename the unzipped Main Theme Folder “Newspaper” to “WebsiteTheme” for Example.
After I have done this I upload this renamed Main Theme Folder to the WordPress Theme folder.

I don´t want to delete any attributs to the Newspaper Developers with this action. Just to make it harder for Bots to find out by Default which Theme I use. If this bots search for Structures like wp-content/themes/Newspaper then the will not find any files cause I have renamed my Newspaper Main Folder.

Hope it is clear now for what I was asking for 🙂

Sorry, but English is not my native Language.

kstockl
tagDiv Member

@ thanop
Thank´s again for your detailed answer 🙂

@ Chris S
Thank´s too for your words about this Issues.

b) Maybe a silly Question – If I nename the Newspaper Folder for Example “WEBSITETHEME” and upload this renamed Theme folder via FTP does this cause any bad Effects (for Example: Path´s inside Newspaper´s Theme Structure – or are this path´s all relative) ? Or should I do it exact the way you have described?

I ask this question just to make it harder for hackers to discover my Themes Structure. As we all know, Newspaper is a most used Template meanwhile…

Thank´s for reply

kstockl
tagDiv Member

@thanop – And a last question

Did you try after updating to Newspaper 7.4 to delete this Theme in WordPress Backend? So that we know if we have to change the procedure for future Newspaper 7 Updates? Or if this caused just with Newspaper 7.3 to 7.4 and WordPress 4.6.0 to 4.6.1?

  • This reply was modified 9 years by kstockl.
  • This reply was modified 9 years by kstockl.
kstockl
tagDiv Member

@thanop – Thank´s for describing how you resolved this Issue.

Just two questions:
You wrote that you manually deleted the Newspaper folder and all it´s files insides this folder.

After that, did you install the theme in backend of WordPress or did you install the Newspaper manually via ftp?
Did you loose any of the settings which you have done after updating?

Thank´s for your reply.

Best Regards, Karl

kstockl
tagDiv Member

Do you have a solution for this Issue? It´s urgent!

Thank´s, Karl

kstockl
tagDiv Member

Hi Support Team,

I get the same Error as Anna.
As Anna I did the same procedure since Newspaper 4. (Deactivating, Delete, Install new Version).
This is the first Time I couldn´t do an Update from previous Version. My actual installed an running Version is Newspaper 7.3

“Löschen fehlgeschlagen: Das angeforderte Theme existiert nicht.”

Thank´s for your quick reply
Karl

  • This reply was modified 9 years by kstockl.
  • This reply was modified 9 years by kstockl.
kstockl
tagDiv Member

Hi Bogdan,
no this wasn´t a free Plugin. But OK. I did a mistake by not asking here before buying.

Which Event Plugin would you prefer and which Event Plugin is compatible with Newspaper Theme?
I bought the Event Plugin Chronosly too. It is from: https://www.chronosly.com/https://www.chronosly.com/
What do you think about this one?

Thank´s for your Reply,
With best Regards, Karl

kstockl
tagDiv Member

I submitted my Site too 🙂
I use Newspaper Theme for News and Information for my Village:
AltenburgNet – Bad Deutsch Altenburg

kstockl
tagDiv Member

Hi,
tested it about one month now and it works with the changed Code.

With best regards, Karl

kstockl
tagDiv Member

Thank you, I made it the same way – custom.

With kind regards, Karl

kstockl
tagDiv Member

Maybe help from me…

Had the same Issues with the Social Counter after Update. The Counter has shown Zero.
I reopend the Social Counter and deleted the Secret Token and saved the Module. Then I opened again the the Social Counter Module again and clicked the Secret Token and saved again.
This brought back my Facebook Fans.

Hope, this will help.

Greets, Karl

kstockl
tagDiv Member

Hi Radu,
thanks for the fast Reply. I changed this meanwhile in Header.php File of the Template.

And do you have a solution for my secon question too?

And a further question. Google Search Console told me that I have not set a “hreflang-Tag” yet.
What does this mean? And which code should a use and whre should I put this code?

Which Code do I have to inlcude to set the “hreflang-Tag” ?
In Google Search Page my Website is listed already but beside there is a Link “Translate this Site”. But this Site is already in german Language.

In Google Search Console I get the message that my Site has not set a “hreflang-Tag” yet so this could causing this Issues I described above.

Many thanks for your Reply,
Karl

kstockl
tagDiv Member

Hi Support,
I have the same question like Tomdouble. I tried to open the Screenshot from Lucian but this Links seems to be broken.

Which code do I have to replace with the existing one

<!doctype html >
<!--[if IE 8]> <html class="ie8" lang="en"> <![endif]-->
<!--[if IE 9]> <html class="ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html <?php language_attributes(); ?>> <!--<![endif]-->

when I want to set it to language german Austria? The meta is here: “de-AT”

And a further question. Google Search Console told me that I have not set a “hreflang-Tag” yet.
What does this mean? And which code should a use and whre should I put this code?

Thanks for your reply
With best Regards, Karl

kstockl
tagDiv Member

Hi Alin,
I don´t use the Jetpack Plugin. I use the normal comments Function from WordPress Core.
And the Code changes I made are working for me so far.
My only Question was if this Code which I changed is correct? Cause I´m not a programmer. And I want to get sure not to run into an Error.

With best Regards, Karl

kstockl
tagDiv Member

I tried following by changing this code Lines in:
wp-content/themes/Newspaper/includes/wp_booster/comments.php
About Line 136:

<?php
//echo get_template_directory_uri() . “/images/avatar.jpg”;
//echo get_avatar($td_comment_auth_email, 50, get_template_directory_uri() . “/images/avatar.jpg”);
if ($comment->user_id) {echo get_avatar($td_comment_auth_email, 50);} else {echo get_avatar( $comment, 50 );}
?>

This seems to work.
But my question now is: Is this code correct? Or does it destroy other things?

Greets, Karl

Viewing 25 posts - 1 through 25 (of 30 total)