Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Coa support
#18
I've done a bit more tidying/hacking this morning - aiming to implement Chris's suggestion.

To start with, I ran some rough find/replace actions to make my new coa/coa.inc readable - basically the following in vim:
Confused%/{/ {\r/g
Confused%/}/ }\r/g
Confused%/;/;\r/g

I tried phptidy, but it didn't do anything useful for me, and I decided it was quicker to do some dirty find/replace than learn how to use phptidy - especially as I hope plue will soon provide the unobfuscated code Smile

Tab indenting was still non-existant, but I soon found four 'coa' strings in the code - the first being part of the opening comments. So I then replaced this:

Code:
$pathPage=$pathTemplates.'page.coa';
$pathConstant=$pathTemplates.'constant.coa';

with this:

Code:
$pathPage=$pathTemplates.'page.coa.php';
$pathConstant=$pathTemplates.'constant.coa.php';

That means I can now use .coa.php files which remove the necessity to hack GS core.

I also modified the function placeObj as follows, although I'm not yet using Coa in a complex enough way for me to test if this works.

Code:
function placeObj($OA) {
  global $pathTheme;
  echo $OA['wrapB'];
  $last4=substr($OA['file'],-4);
  $last5=substr($OA['file'],-5);
  $last8=substr($OA['file'],-8);
  if($last8=='.coa.php')makePage($pathTheme.$OA['file'],1);
  elseif($last4=='.php'||$last4='.htm'||$last5=='.html')include_once($pathTheme.$OA['file']);
  echo $OA['wrapA']."\n";
}

Hope this helps others make Coa a little more GS-friendly.
Reply


Messages In This Thread
Coa support - by plue - 2012-03-11, 00:56:10
Coa 1.6 - by plue - 2012-11-14, 23:55:28
Coa Update - by plue - 2013-02-07, 20:17:41
Coa Update - by plue - 2013-02-15, 00:51:08
Coa support - by Connie - 2012-03-11, 04:32:51
Coa support - by plue - 2012-03-11, 05:22:17
Coa support - by ccagle8 - 2012-03-11, 11:25:38
Coa support - by plue - 2012-03-11, 23:40:13
Coa support - by shawn_a - 2012-03-12, 01:25:48
Coa support - by plue - 2012-03-12, 01:42:30
Coa support - by Connie - 2012-03-12, 19:30:03
Coa support - by plue - 2012-03-12, 19:59:50
Coa support - by plue - 2012-03-12, 21:55:47
Coa support - by reff - 2012-03-16, 10:56:22
Coa support - by plue - 2012-03-16, 18:42:24
Coa support - by plue - 2012-03-19, 00:59:56
Coa support - by Mark Nielsen - 2012-03-23, 06:21:20
Coa support - by ccagle8 - 2012-03-23, 06:49:12
Coa support - by Mark Nielsen - 2012-03-23, 07:17:04
Coa support - by ccagle8 - 2012-03-23, 11:38:45
Coa support - by Mark Nielsen - 2012-03-23, 17:26:11
Coa support - by Mark Nielsen - 2012-03-23, 20:24:36
Coa support - by Connie - 2012-03-23, 21:43:18
Coa support - by plue - 2012-03-23, 22:19:31
Coa support - by plue - 2012-03-23, 22:33:28
Coa support - by plue - 2012-04-01, 23:45:46
Coa support - by Mark Nielsen - 2012-04-03, 20:33:36
Coa support - by plue - 2012-04-15, 23:27:05
Coa support - by plue - 2012-05-04, 02:35:44
Coa support - by sal - 2012-05-18, 09:31:43
Coa support - by plue - 2012-05-18, 22:57:04
Coa support - by plue - 2012-06-19, 19:24:33
Coa support - by plue - 2012-08-16, 18:50:14
Coa support - by rosareven - 2012-08-30, 13:00:11
Coa support - by plue - 2012-08-30, 19:38:13
Coa support - by plue - 2012-08-30, 20:16:41
Coa support - by plue - 2012-09-04, 23:43:08



Users browsing this thread: 1 Guest(s)