AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

[Closed] How to add css class??

8 Posts
2 Users
0 Reactions
2,445 Views
Posts: 30
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@civilenggnotes)
Eminent Member
Joined: 6 years ago
[#13347]

with reference to this link ( https://wpforo.com/community/how-to-and-troubleshooting/where-can-i-find-and-edit-the-file-with-login-register-links-on-the-js-popup/ ), how could I set the class by the second method. I could not understand properly. I have moved the file to my child theme directory. So, I think, there will be no update problem. 


7 Replies
Alvina
Posts: 1857
Moderator
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@alvina)
Member
Joined: 7 years ago

Hi @civilenggnotes,

The second method provided in the above link means that another way to change the login link is customizing the add_footer_html() function and make it work as you need.

Also please provide in detail what you want to change, provide the screenshot, and we will try to help you.


Posts: 30
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@civilenggnotes)
Eminent Member
Joined: 6 years ago

I want to add the css class for the ajex login model to popup every time the the login/register button is clicked. and also the add topic for non logged-in users. I have 3 screenshot. so I am attaching the google drive link. please have alook.

1. https://drive.google.com/open?id=1cgHsMj9QXWhKit7Nzu7G-1chEbERcTku

2. https://drive.google.com/open?id=1mJ5AJpckrSK3mciyWplgal_Dhv8By4oe

3. https://drive.google.com/open?id=15ycLSx2xsqDCR6N7SNZtJJ4Gbvu5Uj5J


Posts: 30
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@civilenggnotes)
Eminent Member
Joined: 6 years ago
Posted by: @alvina

means that another way to change the login link

I understand that. and my question is there. I found the following code in the class-template.php file.

    public function add_footer_html(){
	    $this->dialog();
	    $this->spinner();
	    if( apply_filters( 'wpforo_message_bubble', true ) ) $this->msg_box();
	    if( WPF()->current_object['template'] === 'post' ) $this->report_form();
    }

What to add/replace, I could not understand. If I only have to add the below code, above/below which line I should put? and I think it is for the login, so what about the registration?? and last question, do I have to change anything for logout option??

jQuery(document).ready(function(){
jQuery('#wpf-msg-box a[href$="?wpforo=signin"]').replaceWith('<span class="lrm-login">Login</span>');
});

1 Reply
Alvina
Moderator
(@alvina)
Joined: 7 years ago

Member
Posts: 1857
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@civilenggnotes,

how could I set the class by the second method. I could not understand properly. I have moved the file to my child theme directory. So, I think, there will be no update problem. 

We strongly recommended doesn't use the second method if you don't have a knowledge in programming. This is not the update save way, as Sofy already mentioned.

 and I think it is for the login, so what about the registration??

You just need to use the code provided by Sofy as described here, to make it work:

jQuery(document).ready(function(){
jQuery('#wpf-msg-box a[href$="?wpforo=signin"]').replaceWith('<span class="lrm-login">Login</span>');
});

Just change the red marked value, with your class name.

Also please note if you remove the #wpf-msg-box selector from the code above, it'll replace all login links (wpForo). 

For the register page, you just need to change the wpforo=signin to wpforo=signup in the code provided above.


Posts: 30
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@civilenggnotes)
Eminent Member
Joined: 6 years ago

Should i put this code below this line??

public function add_footer_html(){

Or above the ending bracket"}"??

2 Replies
Alvina
Moderator
(@alvina)
Joined: 7 years ago

Member
Posts: 1857
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@civilenggnotes,

Please follow the steps below to put the code:

1. Install the Simple Custom CSS and JS plugin:  https://wordpress.org/plugins/custom-css-js/

2.  Add the following JS code via the plugin.


(@civilenggnotes)
Joined: 6 years ago

Eminent Member
Posts: 30
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

hi @alvina

i have tried this, but it is not working. i need to use the same 'lrm-login' class. So, I am deactivating the plugins..


Share: