• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

XF Optimise

Status
Not open for further replies.
Not untill he adds them into the whitelist :) same as twitter

Ah whitelist :)

/library/Dark/XFOptimise/Iroha.php

Changed this line:
Code:
return stripos($match, "google_ad") !== false || stripos($match, "show_ad") !== false || stripos($match, "_google") !== false;
To this:

Code:
return stripos($match, "google_ad") !== false ||stripos($match, "AdBrite") !== false || stripos($match, "show_ad") !== false || stripos($match, "_google") !== false;
 
I installed this add-on today. I made sure my js and js-old folders were 777 then ran it in the ACP. I received a message stating "An unexpected database error occurred. Please try again later."

I checked my js-old directory and it had all the correct folders present. I ran it again and a page header of Minify Javascript appeared, listing all my files with a message of "skipped; already up to date".

I assume all is well?

Also, I am experiencing the same issue smsmasters reported. On my home page I have a twitter module. The block remains in place but all of the tweets appear below the footer instead of within the block. I have a similar issue on my forums where I have a ventrilo monitoring block.

I disabled Defer Javascript Loading in the ACP and the issue went away. How can I adjust so I can turn that option back on?
 
I installed this add-on today. I made sure my js and js-old folders were 777 then ran it in the ACP. I received a message stating "An unexpected database error occurred. Please try again later."

I checked my js-old directory and it had all the correct folders present. I ran it again and a page header of Minify Javascript appeared, listing all my files with a message of "skipped; already up to date".

I assume all is well?

Also, I am experiencing the same issue smsmasters reported. On my home page I have a twitter module. The block remains in place but all of the tweets appear below the footer instead of within the block. I have a similar issue on my forums where I have a ventrilo monitoring block.

I disabled Defer Javascript Loading in the ACP and the issue went away. How can I adjust so I can turn that option back on?
Not untill he adds them into the whitelist :) same as twitter
Or you can make the changes yourself.
 
I would like to understand how to determine the correct code used to fix the issue I am experiencing with my modules.

For example, my Twitter module issue that smsmasters and I shared where all the code appears at the bottom of the site. I understand I need to ad it to the below code. Instead of "google_ad" or "AdBrite" what do I use? I MUST understand how that tag is determined. I have multiple other non-standard js dependent blocks on my site. One for MS Translator, another for a ventrilo monitor, etc.

Code:
stripos($match, "google_ad") !== false;
 
I would like to understand how to determine the correct code used to fix the issue I am experiencing with my modules.

For example, my Twitter module issue that smsmasters and I shared where all the code appears at the bottom of the site. I understand I need to ad it to the below code. Instead of "google_ad" or "AdBrite" what do I use? I MUST understand how that tag is determined. I have multiple other non-standard js dependent blocks on my site. One for MS Translator, another for a ventrilo monitor, etc.

Code:
stripos($match, "google_ad") !== false;

Any unique text from the url or inline script code
 
Whenever I make any change to the Iroha.php file and save it, my site immediately gives the below error on all pages

Parse error: syntax error, unexpected T_BOOLEAN_OR in /home/terapvpc/public_html/library/Dark/XFOptimise/Iroha.php on line 48

Unaltered code
Code:
protected function _jsLeave($match){ return stripos($match, "google_ad") !== false || stripos($match, "show_ad") !== false || stripos($match, "_google") !== false; }
Code with my adjustment
Code:
 protected function _jsLeave($match){ return stripos($match, "google_ad") !== false || stripos($match, "show_ad") !== false || stripos($match, "_google") !== false; || stripos($match, "widgets.twitter.com/j") !== false; }
Code with the adjustment Junior suggested:
Code:
 protected function _jsLeave($match){ return stripos($match, "google_ad") !== false || stripos($match, "show_ad") !== false || stripos($match, "_google") !== false; || stripos($match, "TWTR") !== false; || stripos($match, "twimg") !== false; }
 
TY DI. I removed the ; from my script and my site didn't crash :)

I tried my adjustment listed above, and it did not work. The tweets were still taken from the sidebar and placed at the bottom of the screen. I then tried the code Junior suggested and it worked.

My main question now is...how were the "TWTR" and "twimg" terms decided upon? and how come that block requires two entries?

The reason I ask is I have a couple other javascripts on my site. I cannot use the Defer JS Loading option until they are all adjusted for. For example my ventilo script is
Code:
<div class="section">
   <div class="secondaryContent statsList" id="vent">
      <h3>Ventrilo</h3>
      <span id="instantventrilo"><a href="http://www.instantventrilo.com/">ventrilo</a> Hosting by InstantVentrilo.com</span><script type="text/javascript" src="http://view.light-speed.com/ventrilo.php?IP=v44.darkstarllc.com&amp;PORT=27504&amp;STYLE=2&amp;CHANNEL_WNOUSER=NO&amp;SHOW_IP_PORT=YES&amp;HELP=YES&amp;CONLINK=YES&amp;WIDTH=225&amp;FONTSIZE=10&amp;BGCOLOR=393939&amp;SN_BGCOLOR=393939&amp;SN_COLOR=969696&amp;INFO_BGCOLOR=393939&amp;INFO_COLOR=ffffff&amp;HELP_BGCOLOR=393939&amp;HELP_COLOR=000000&amp;CHANNEL_BGCOLOR=c8c8c8&amp;CHANNEL_COLOR=969696&amp;UN_BG=393939&amp;UN=1061b3&amp;METHOD=js"></script>
</div>
</div>
 
Ive also been trying to block twitter and was unable to ..
You will just have to wait untill dark adds it to the next release same as me I guess ;)

Junior's code works perfectly. Replace your line of code with the below and your Xen Portal twitter block will appear correctly.

Code:
protected function _jsLeave($match){ return stripos($match, "google_ad") !== false || stripos($match, "show_ad") !== false || stripos($match, "_google") !== false; || stripos($match, "TWTR") !== false; || stripos($match, "twimg") !== false; }
 
Junior's code works perfectly. Replace your line of code with the below and your Xen Portal twitter block will appear correctly.

Code:
protected function _jsLeave($match){ return stripos($match, "google_ad") !== false || stripos($match, "show_ad") !== false || stripos($match, "_google") !== false; || stripos($match, "TWTR") !== false; || stripos($match, "twimg") !== false; }
Hmm no it don't also as dark says there is too many semicolon in that code

should be

PHP:
protected function _jsLeave($match){
return stripos($match, "google_ad") !== false || stripos($match, "show_ad") !== false || stripos($match, "_google") !== false || stripos($match, "TWTR") !== false || stripos($match, "twimg") !== false;
}

But that still does not work
 
I do apologize about forgetting to remove the semicolons in the code I shared with you, but I am not mistaken about the code working.

It is working on my site right now. Take a look:

Home page: www.TeraPVP.com notice my twitter box appears fine
Forum page www.TeraPVP.com/forum notice in the sidebar my ventrilo block is empty, then scroll down and you will see the contents at the bottom

I'll leave my site in this state for a bit so you can confirm, but I will remove the vent block in about 20 minutes.
 
I see your twitter block but not the contents. For me the contents appeared at the bottom of the page. Where did yours go?

PS. I really love your site. It looks so clean.
 
Status
Not open for further replies.
Back
Top Bottom