dkraken
asked 6 years ago

 
I noticed that in the general questions list if you hover over a user, you will see this link,
example.com/?user=kraken
then on clicking on the link, it will display a list of all the questions that user has asked. How can I remove that? Because even an anonymous user can see it. Also, I am running BuddyPress so I want it to redirect to the user\’s Activity Page, instead of showing all his DWQA Questions to everybody.

2 Answers
DominicStaff
answered 6 years ago

Please let me know which version are you using? we have made the plugin compatible with the BuddyPress plugin, we have tested on our demo and it works fine.

dkraken
replied 6 years ago

I am using version 1.4.7

dkraken
replied 6 years ago

are you still there?

Dominic Staff
replied 6 years ago

Yes, I’m here.
If you disable hover link for the username, you can use the following code:
.dwqa-questions-list .dwqa-question-item a {
cursor: default;
pointer-events: none;
}
span.dwqa-question-category a {
cursor: pointer !important;
pointer-events: auto !important;
}

If you want to redirect to the Buddypress profile after clicking the author name. Please send me username & password of your site for further checking.

dkraken
replied 6 years ago

I tried creating a new plugin “dw-custom” and created a new file “custom.php” and pasted the code but it didn’t work.

Then I tried pasting into plugin Original DWQA Plugin via WP Dashboard but it returned an error stating that it cant save it that it has an error in the first line of code you gave me. Then I tried pasting it in the functions of my theme but it returned exactly the same error referring to the first line you gave me.

“`Your PHP code changes were rolled back due to an error on line 59 of file wp-content/themes/boss-child/functions.php. Please fix and try saving again.
syntax error, unexpected ‘.’“`

Line 59 in this case is “`”.dwqa-questions-list .dwqa-question-item a {” “`

How do you propose i make this work?

Dominic Staff
replied 6 years ago

You can not add the css code to the php file. Please go to the Dashboard > Themes > Editor > style.css file then add the code to the style.css file.

dkraken
replied 6 years ago

forgive me, I feel so embarrassed. too much of PHP i guess. I did that and it hid every hover details except the category, couldn’t show the link to the question and couldn’t respond to clicks. Check the code i think it was meant to hide everything in the box, but you made category important. Is there a way you can give the avatar a class so you can just hide the hover for the avatar alone?

Dominic Staff
replied 6 years ago

Please send me username & password of your site for further checking.

dkraken
replied 6 years ago

I cant send such information publicly, the site already has users info. I can’t risk compromising them, I could create a Mod account for you and send you details but has to be a private medium.

BUT
In your plugin CSS Source Code, just make the avatar a class so you can use that class and make the hyperlink behaviour nothing on mouse over or on hover.
Instance .dwqa-questions-list .dwqa-question-item .avatar a hover {pointer-events: none;
then nothing is supposed to happen here on hover} or even
.dwqa-questions-list .dwqa-question-item .avatar a {pointer-events: none;
nothing happens to any link connected to “a” }.

i don’t know if you get me, a lot of things are going ON in my head so I don’t know how this thing i wrote will come out to a person, but i hope that you understand what i meant.

Dominic Staff
replied 6 years ago

Yes, Please send me your site URL for further checking.

dkraken
replied 6 years ago
Dominic Staff
replied 6 years ago

you can use the following code:

span.dwqa-question-category a {
cursor: pointer !important;
pointer-events: visible !important;
}
.dwqa-questions-list .dwqa-question-item a {
cursor: default;
pointer-events: none;
}

dkraken
replied 6 years ago

didn't work bro. behaved exactly like the first one you sent me.

dkraken
answered 6 years ago

This Fixed it.

/*hide dw-avatar*/
.dwqa-question-item .avatar {
 position: absolute;
 left: 15px;
 top: 0;
 border-radius: 48px;
 cusor: default;
 pointer-events: none;}
/*hide dw-avatar end*/

Thanks for your concern and support so far. Wouldn’t have done it without you. 🙂

dkraken
replied 6 years ago

as a matter of fact to avoid repeating scripts and risk slowing the site or making the coding look amateur this line could do.

/*hide dw-avatar*/
{ pointer-events: none;}
/*hide dw-avatar end*/

am right, right? This single line of code got two grown men almost running around in circles for weeks. XD

Dominic Staff
replied 6 years ago

Yes, You right :), but you need to include the class before the “{ pointer-events: none;}” CSS code.

Powered by DW Question & Answer Pro