The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

'Copy Code' Javascript not working.

+2
SLGray
ivyleaf
6 posters

Go down

Solved 'Copy Code' Javascript not working.

Post by ivyleaf May 1st 2018, 8:42 am

Technical Details


Forum version : #phpBB2
Position : Founder
Concerned browser(s) : Google Chrome
Screenshot of problem : https://images2.imgbox.com/f3/c2/ekFMrqBH_o.gif
Who the problem concerns : All members
When the problem appeared : The script has never worked before - it's always acted this way.
Forum link : http://bioluminessence.forumotion.com/

Description of problem

Hello, this is my first time submitting one of these, so apologies if I've done anything wrong.

I've been working on a forum, and grabbed a few Javascripts to make it easier to use. However, several of them did not work, this code being one of them. When I click on the Copy Code button, it doesn't do anything. I know next to nothing about Javascript, so I would appreciate if someone more experienced could give me some insight!

I have made little to no changes to the templates, and several other scripts I've tried have not worked either (this and this), perhaps the issues could be related?

Thanks in advance!


Last edited by ivyleaf on May 4th 2018, 1:50 am; edited 2 times in total
ivyleaf
ivyleaf
New Member

Posts : 22
Reputation : 1
Language : English, Mandarin
Location : Taiwan

http://ivytestforum.forumotion.com/

Back to top Go down

Solved Re: 'Copy Code' Javascript not working.

Post by SLGray May 1st 2018, 8:49 am

Do you have JavaScript Management turned on?


'Copy Code' Javascript not working. Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51554
Reputation : 3524
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: 'Copy Code' Javascript not working.

Post by ivyleaf May 1st 2018, 9:10 am

If you are referring to this, then yes, I do have it turned on. I have gotten one Javascript to work before, just not anything else.
ivyleaf
ivyleaf
New Member

Posts : 22
Reputation : 1
Language : English, Mandarin
Location : Taiwan

http://ivytestforum.forumotion.com/

Back to top Go down

Solved Re: 'Copy Code' Javascript not working.

Post by SLGray May 1st 2018, 9:12 am

Did you set this one to all pages?


'Copy Code' Javascript not working. Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51554
Reputation : 3524
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: 'Copy Code' Javascript not working.

Post by ivyleaf May 1st 2018, 9:13 am

Yes, I have.
ivyleaf
ivyleaf
New Member

Posts : 22
Reputation : 1
Language : English, Mandarin
Location : Taiwan

http://ivytestforum.forumotion.com/

Back to top Go down

Solved Re: 'Copy Code' Javascript not working.

Post by SLGray May 1st 2018, 9:22 am

Did you say that you have modified your templates?


'Copy Code' Javascript not working. Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51554
Reputation : 3524
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: 'Copy Code' Javascript not working.

Post by ivyleaf May 1st 2018, 9:25 am

Yes, only according to this post when the Javascript did not work. It did not appear to have any effect.

Edit; never mind, it appears that I had misread the post. This change was made to the Javascript and has since then been changed back. Otherwise I don't think I've made any changes to templates.
ivyleaf
ivyleaf
New Member

Posts : 22
Reputation : 1
Language : English, Mandarin
Location : Taiwan

http://ivytestforum.forumotion.com/

Back to top Go down

Solved Re: 'Copy Code' Javascript not working.

Post by Ape May 1st 2018, 8:20 pm

@ivyleaf Is this now solved ?

If yes please press the mark solved button that can be found at the top of this thread.

APE.


'Copy Code' Javascript not working. Left1212'Copy Code' Javascript not working. Center11'Copy Code' Javascript not working. Right112
'Copy Code' Javascript not working. Ape_b110
'Copy Code' Javascript not working. Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19435
Reputation : 2010
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: 'Copy Code' Javascript not working.

Post by ivyleaf May 2nd 2018, 1:39 am

No, it has not been solved yet.
ivyleaf
ivyleaf
New Member

Posts : 22
Reputation : 1
Language : English, Mandarin
Location : Taiwan

http://ivytestforum.forumotion.com/

Back to top Go down

Solved Re: 'Copy Code' Javascript not working.

Post by brandon_g May 2nd 2018, 3:12 am

Do you have any other codes installed on your forum?


'Copy Code' Javascript not working. Brando10
Remember to mark your topic 'Copy Code' Javascript not working. Solved15 when a solution is found.
General Rules | Tips & Tricks | FAQ | Forgot Founder Password?

'Copy Code' Javascript not working. Scre1476
Team Leader
Review Section Rules | Request A Review | Sticker Points
brandon_g
brandon_g
Manager
Manager

Male Posts : 10113
Reputation : 923
Language : English
Location : USA

https://www.broadcastingduo.com

Back to top Go down

Solved Re: 'Copy Code' Javascript not working.

Post by ivyleaf May 2nd 2018, 4:45 am

In Javascript, I have codes for Immediate Redirection (after a message or post), Word Counter, Copy Code, Topic Preview, and Personalized Color Palette, all of which are from this forum except for perhaps the Copy Code. I didn't make any changes to the original Javascript. I don't think CSS should affect this, and I haven't really done much there at all, but the code's in the spoiler. I haven't made any other changes elsewhere with code.

Spoiler:

Edit; Never mind, the 'Copy Code' function seems to be working on all the forums necessary when I tried it on other sections of the forum. Will be marking as solved, though I still don't understand why it only works in some forums.
ivyleaf
ivyleaf
New Member

Posts : 22
Reputation : 1
Language : English, Mandarin
Location : Taiwan

http://ivytestforum.forumotion.com/

Back to top Go down

Solved Re: 'Copy Code' Javascript not working.

Post by SLGray May 2nd 2018, 8:32 am

Wait a minute!  Is the issue happening in the Your First Subject topic?  I see that it looks like a quote, not a code box.


'Copy Code' Javascript not working. Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51554
Reputation : 3524
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: 'Copy Code' Javascript not working.

Post by ivyleaf May 2nd 2018, 10:21 am

Oh, you're right! Huh, can't believe I didn't notice that sooner, thanks for letting me know;;

Do you know why the Copy Code text appears there, though, and if there's any way to get rid of it?
ivyleaf
ivyleaf
New Member

Posts : 22
Reputation : 1
Language : English, Mandarin
Location : Taiwan

http://ivytestforum.forumotion.com/

Back to top Go down

Solved Re: 'Copy Code' Javascript not working.

Post by SarkZKalie May 2nd 2018, 11:21 am

Could you please provide a test account so i / we can login it and find out your problem?

P/S : Too lazy to be a member Twisted Evil


'Copy Code' Javascript not working. Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1443
Reputation : 220
Language : English

https://rotavn.forumotion.com/

Back to top Go down

Solved Re: 'Copy Code' Javascript not working.

Post by ivyleaf May 2nd 2018, 1:21 pm

One has been made - login information is located in the Announcement test thread.
ivyleaf
ivyleaf
New Member

Posts : 22
Reputation : 1
Language : English, Mandarin
Location : Taiwan

http://ivytestforum.forumotion.com/

Back to top Go down

Solved Re: 'Copy Code' Javascript not working.

Post by TheCrow May 2nd 2018, 2:28 pm

Hello @ivyleaf,

It seems that your quotes have the class
Code:
codebox
which is why the Copy Code appears there. Have you changed the blockquote appearance?


'Copy Code' Javascript not working. Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: 'Copy Code' Javascript not working.

Post by ivyleaf May 2nd 2018, 5:23 pm

No, I have not. What should I change and where?
ivyleaf
ivyleaf
New Member

Posts : 22
Reputation : 1
Language : English, Mandarin
Location : Taiwan

http://ivytestforum.forumotion.com/

Back to top Go down

Solved Re: 'Copy Code' Javascript not working.

Post by SLGray May 2nd 2018, 7:05 pm

You did say that you have modified some templates.  Which ones did you modify?


'Copy Code' Javascript not working. Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51554
Reputation : 3524
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: 'Copy Code' Javascript not working.

Post by SarkZKalie May 2nd 2018, 8:59 pm

It worked fine for me. So i can say something that :
- Any script put 'in the all page' will be merged into an only one js file, problem could be start from here. I mean a conflict between other js.
Code:
http://bioluminessence.forumotion.com/t3-announcement-test#4
However the 'preview topic' didn't work and I would like to suggest you to change your current viewtopic_body template by this one
- First of all, search and locate this line in your current template
Code:
<tr class="post post--
- Replace by
Code:
<tr id="previewr" class="post post--
- Next step, search and locate this line in your current preview post javascript
Code:
.attr('href')+' .post:eq(0)');
- Replace by
Code:
.attr('href')+' #previewr:eq(0)');

LIVE DEMO

Put the script 'in the sub-forums' do work in blog mode.

P/S: Sorry for my bad English


Last edited by SarkZKalie on May 3rd 2018, 8:13 am; edited 1 time in total (Reason for editing : Wrong text)
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1443
Reputation : 220
Language : English

https://rotavn.forumotion.com/

Back to top Go down

Solved Re: 'Copy Code' Javascript not working.

Post by TheCrow May 2nd 2018, 10:54 pm

@SarkZKalie the problem is that the tutorial makes the "Copy Code" appear on Quotes as well. It was working fine to the Codeboxes. Wink


'Copy Code' Javascript not working. Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: 'Copy Code' Javascript not working.

Post by ivyleaf May 3rd 2018, 1:45 am

1) I'd been mistaken and edited to say so. No templates have been modified to my memory, besides what SarkZKalie advised me to do just now.
2) Thanks so much for your help, it works great now! And yes, the issue Luffy mentioned is what I'm trying to figure out right now.
ivyleaf
ivyleaf
New Member

Posts : 22
Reputation : 1
Language : English, Mandarin
Location : Taiwan

http://ivytestforum.forumotion.com/

Back to top Go down

Solved Re: 'Copy Code' Javascript not working.

Post by SarkZKalie May 3rd 2018, 8:21 am

Ah, I didn't see the 'quote content' Very Happy but I got the same issue when installing that copy code to my test site.

@ivyleaf have you tried to set its placement this tutorial to 'in the topics' only? Remember, turn off or remove previous copy code before installing a new one.


'Copy Code' Javascript not working. Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1443
Reputation : 220
Language : English

https://rotavn.forumotion.com/

Back to top Go down

Solved Re: 'Copy Code' Javascript not working.

Post by ivyleaf May 4th 2018, 1:49 am

Oh, that actually works perfectly, thanks! I think that's all my problems actually solved now, heh.
ivyleaf
ivyleaf
New Member

Posts : 22
Reputation : 1
Language : English, Mandarin
Location : Taiwan

http://ivytestforum.forumotion.com/

Back to top Go down

Solved Re: 'Copy Code' Javascript not working.

Post by SarkZKalie May 4th 2018, 9:52 am

You're welcome, friend


'Copy Code' Javascript not working. Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1443
Reputation : 220
Language : English

https://rotavn.forumotion.com/

Back to top Go down

Solved Re: 'Copy Code' Javascript not working.

Post by SLGray May 4th 2018, 12:18 pm

Problem solved & topic archived.
Please read our forum rules:  ESF General Rules


'Copy Code' Javascript not working. Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51554
Reputation : 3524
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum