Forum Activity for @derrickhand300

derrickhand300
@derrickhand300
02/07/18 10:12:23AM
1,353 posts

How to use Google Adsense Code in the Tinymce html editor


Design and Skin Customization

Thinking out loud
Ok Ive changed
extended_valid_elements: "script[type|defer|src|language]",
to this In SiteBuilder's Form_editor.tpl
extended_valid_elements : "script[src|type|language]",
and seem to be getting closer as less code is getting stripped.
If I can get this figured out-could the template be edited like this so that only ADMINS can add scripts?
{if jrUser_is_admin()}extended_valid_elements : "script[src|type|language]",{/if}

Seems like if this is possible it would be very useful for the websites?
Thanks

Using this adsense code and pasting into the editor
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
     style="display:block; text-align:center;"
     data-ad-layout="in-article"
     data-ad-format="fluid"
     data-ad-client="ca-pub-4020801146046639"
     data-ad-slot="9853926026"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>
after saving in the editor its getting changed to this
<script src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle" style="display: block; text-align: center;" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-4020801146046639" data-ad-slot="9853926026"></ins>
<script>// <![CDATA[
(adsbygoogle = window.adsbygoogle || []).push({});
// ]]></script>
which is quite a bit closer than what I had
Sorry for so much aimless rambling on this-its just usually when i flounder around like this in public someone will come to the rescue :)
updated by @derrickhand300: 02/07/18 10:19:19AM
derrickhand300
@derrickhand300
02/07/18 09:38:03AM
1,353 posts

How to use Google Adsense Code in the Tinymce html editor


Design and Skin Customization

extended_valid_elements: "script[type|defer|src|language]",
Thats in form_editor.tpl
From what i am reading using Google this is where we add or allow scripts...but looks like they are already allowed? Could this be stripping scripts even though they look to be allowed?
 paste_strip_class_attributes: true,
which is quite a bit closer than what i started with
Wonder if someone could tell me if thats what it reads...
Thanks
updated by @derrickhand300: 02/07/18 10:18:13AM
derrickhand300
@derrickhand300
02/07/18 07:28:35AM
1,353 posts

How to use Google Adsense Code in the Tinymce html editor


Design and Skin Customization

michael:
script its always going to be stripped out.

It might get through if you have the ALLOW ALL HTML setting set at:
ACP -> CORE -> QUOTA CONFIG -> ALLOW ALL HTML

but allowing users to enter scripts is usually frowned upon.

Is there another way to put Google Adsense ads into my blog?
Thank you
derrickhand300
@derrickhand300
02/06/18 07:49:24PM
1,353 posts

How to use Google Adsense Code in the Tinymce html editor


Design and Skin Customization

From what I have read it seems there is a php file that needs to be edited to allow scripts in tinymce
I understand the reason for scripts being prohibited is that anyone could insert a adsense script in comment boxes etc on the site.
On my particular site i could like to ALLOW scripts in tinymce as I am the only one who has access to the editor although it seems like someone at JR could easily write a code that says "If users is admin- allows scripts- else no scripts"
Pretty strange that we cannnot ad adsense ads to our blogs because of this...just my opinion as I see blogs everywhere covered in ads...

Anyway i have been into SYSTEM CORE>.CONTRIB>TINY MCE>PLUG INS and i cannot find a file in php or anywhere in a folder called "Prohibited Elements"...this is where I have read that we can allows scripts-iframes etc....can anyone tell me where to find the file/folder for tinymce?
Thank you
derrickhand300
@derrickhand300
02/06/18 10:05:55AM
1,353 posts

How to use Google Adsense Code in the Tinymce html editor


Design and Skin Customization

Hello-
I want to add the following Adsense code into my articles just using the tinymec editor html tab
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
     style="display:block; text-align:center;"
     data-ad-layout="in-article"
     data-ad-format="fluid"
     data-ad-client="ca-pub-4020801146046639"
     data-ad-slot="9853926026"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>
In the past I have added the code using
{literal} code here{/literal}
in the template editor b ut in Blog there is no template editor...
Just wondering iof there is a way to make this code work in the common tinymce html code editor?
Ive not run Google Ads in some time- Ive installed this script today in a few blogs and after several hours its still blank on the page....when I go back into the tinymce editor and check the code it looks like this
<p>
<script src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
</p>
<p><ins class="adsbygoogle" style="display: block; text-align: center;" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-4020801146046639" data-ad-slot="9853926026"></ins></p>
<p>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>
</p>
Thanks
updated by @derrickhand300: 05/12/18 01:34:09PM
derrickhand300
@derrickhand300
02/03/18 01:43:07PM
1,353 posts

Items Rating-How to block a bot


Design and Skin Customization

Yes on my site i am the only logged in users...I allow unlogged in users to rate
My site has 1 member- me
everyone else is a visitor
derrickhand300
@derrickhand300
02/03/18 01:41:35PM
1,353 posts

new server (very fast) still some issues remain


Installation and Configuration

SteveX:
Not another "Very very very fast but doesn't work at all" server, is it?

You are so unlucky with your servers!

hahahaha ME? I moved to a cloud server last night- they sold me by telling me it was the closest thing you could get to dedicated without getting dedicated...Now Im on "Cloud 2" i wish i was on "Cloud 9"...beam me up scotty
Capture.JPG Capture.JPG - 34KB
derrickhand300
@derrickhand300
02/03/18 11:58:35AM
1,353 posts

new server (very fast) still some issues remain


Installation and Configuration

Read 'Um And Weep :)
Apparently you get extra points bonus for multiple processors
Capture.JPG Capture.JPG - 83KB

updated by @derrickhand300: 02/03/18 11:59:26AM
derrickhand300
@derrickhand300
02/03/18 09:04:45AM
1,353 posts

Items Rating-How to block a bot


Design and Skin Customization

I have some sort of bot that comes to my site and runs through a bunch of items rating each a 1 star
I have tried stopping bots from entering Item Ratings using Robots.txt file but still it keeps happening
I will attach an email showing all the ratings i received in just a minute or so
Is there a way to add a time out somehow so that if an item is rated another cannot be rated for like 20 seconds?
Or is there a way to make the Items rating module just disregard ALL ratings that are a 1 star...
Im going in with the bulk edit tool to remove them but its become a weekly task which I wish i didnt have to do
I suppose i could ban the IP of the bot...but in the past banning IPs can present problems where entire groups of IP's get banned...I would prefer to just remove the Items rating from items before banning IPs
Thanks
Capture.JPG Capture.JPG - 134KB

updated by @derrickhand300: 05/05/18 08:36:35AM
derrickhand300
@derrickhand300
01/27/18 07:52:27AM
1,353 posts

Jamroom Handling Huge Traffic flawlessly


Off Topic

SteveX:
Jamroom performing flawlessly is unsurprising :)

What were your server issues?

Well I am on a fully managed server so I dont know all the tech stuff...but they had to make adjustments to the php settings then assign 500 "Apache workers' I think is what they said..
  13