Forums / Cotonti / General / rc.php?

DemptD
#1 2009-07-28 12:12
what is it for?

rc.php...
Kilandor
#2 2009-07-28 17:48
Well to use it requires htaccess rules basicly, what its for is so links still work say to images/css/swf or whatever, thats not web accessible it read the file and outputs it back out just like it was really in a web folder.

Its usefull for people if they decide to share plugins across multiple sites.
Trustmaster
#3 2009-07-28 19:02
Besides that it does 2 things:
  • Controls caching of static files (which saves poor IE users, because IE cannot control cache itself)
  • Compresses JS/CSS files with GZIP
May the Source be with you!
foxhound
#4 2012-08-13 12:02

Sorry to dig up an old thread but in relation to this:

[quote]Compresses JS/CSS files with GZIP[/quote]

Does that mean any js files specified in the rc.php should not be minified already?
I am asking that cause any javascript file I add there seems to not work. If i add the script normally in the header.tpl it works just fine.

I have this in my header:

    <script type="text/javascript" src="themes/nemesis/js/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="themes/nemesis/js/jquery.easing.1.3.min.js"></script>
    <script type="text/javascript" src="themes/nemesis/js/jquery.wt-rotator.min.js"></script>

which works (the slider using this javascript).
However, if i disable those in my header and activate these lines in my rc.php than it (the slider using this javascript) does not work:

cot_rc_add_file('themes/nemesis/js/jquery-1.7.1.min.js');
cot_rc_add_file('themes/nemesis/js/jquery.wt-rotator.min.js');
cot_rc_add_file('themes/nemesis/js/jquery.easing.1.3.min.js');

I am really lost and do not see what I am doing wrong if my above assumption is not correct.

 

<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
GHengeveld
#5 2012-08-13 13:30

Correct. You should not use minified javascripts with rc_add because it may cause problems (not always). It's best if you just download the original js source, use that instead and let Cotonti handle the minification.

This post was edited by GHengeveld (2012-08-13 13:50, 11 years ago)
foxhound
#6 2012-08-13 15:08

Thanks for the confirmation. I can stop banging my head now.

<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
Kingsley
#7 2012-08-13 15:41
#35132 GHengeveld:

Correct. You should not use minified javascripts with rc_add because it may cause problems (not always). It's best if you just download the original js source, use that instead and let Cotonti handle the minification.

Well, this sheds some light on some of my 'problems'... thankssssssss

 

elfrenazo
#8 2012-08-14 16:35

I'm using it without problems, and have many scripts