Page 2 of 2

Re: ocPORTAL / Composr install & modify tips

Posted: Mon Sep 18, 2017 7:52 pm
by Stevyn
i wanted to include some images at the bottom of a few wiki pages so i created a convenient EDIT link in "templates/WIKI_PAGE_SCREEN.tpl" a demo of this is on the same page http://nandalow.com/phuturecon/index.ph ... wse&id=143 (the robot critter is below the wiki)

Code: Select all

{+START,IF,{$IS_ADMIN}}
<a href="http://yourwebsite.com/adminzone/index.php?page=admin-themes&type=_edit_templates&theme={$ZONE}&directory=templates&suffix=.tpl&template_0=on&f0file%5B%5D=templates%2FWIKI_PAGE_SCREEN.tpl">edit</a>
{+END}

Re: ocPORTAL / Composr install & modify tips

Posted: Sun Apr 01, 2018 9:47 pm
by Stevyn
Updated COMPO.SR install infos::::

https://compo.sr/download.htm

1. uploaded quick auto install

2. crashed due to perms. my FTP is steve , so i changed ownership for all files to www-data as that is apache. I will add steve to apache later to make FTP play well.

Re: ocPORTAL / Composr install & modify tips

Posted: Mon Feb 04, 2019 2:23 pm
by Stevyn
my custom changes to the language file
Hello,

I enjoy tweaking all the little things on the system and today I changed:

Your action was successful.

to

Another Victory!

I did this to honor my late friend Pat R. in Michigan who whenever anything good happened would yell out "Another Victory!" which always made me smile. For example he helped me get my car unstuck from the snow, he announced, "Another Victory!"

1. admin zone -> Style -> Translate/rephrase
2. SEARCH -> Your action was successful.
3. edit to: Another Victory!

Anyone else have some unique rephrasing ideas?

Re: ocPORTAL / Composr install & modify tips

Posted: Sat Feb 09, 2019 4:21 pm
by Stevyn
Including php in a template

There's a hidden option you can enable via Commandr:

Code: Select all

:set_value('allow_php_in_templates', '1');
example useage:

Code: Select all

 {+START,PHP}  echo "OK";  {+END}
note: adds extra security issues!!!

https://compo.sr/forum/topicview/browse ... p-in-a.htm

remove "FEATURES" from mobile template

Posted: Sun Feb 17, 2019 12:44 pm
by Stevyn
The word FEATURES shows up on the mobile version of on top of the right panel

remove it & the line (HR) by editing: templates/GLOBAL_HTML_WRAP_mobile.tpl

around line 30:

comment out or remove:

Code: Select all

<div class="global_middle">
			<hr class="spaced_rule" />

			<h2>{!FEATURES}</h2>
		</div>

test / run code temp for testing in Composr

Posted: Sun Feb 24, 2019 12:13 pm
by Stevyn
from https://compo.sr/docs/codebook-1b.htm

Running temporary code
If there's some code you want to run once (e.g. if you are running a test, or running a quick bit of code to fix some data) you may find our data_custom/execute_temp.php useful.

The advantages to this file are…
It automatically loads up extra code useful for doing common structural changes (e.g. menu changes, module management). In other words you don't have to call up so much code yourself.
It is configured to output plain text (text/plain mime-type), so you don't have to template any debug output you put out. If you see if output something other than plain text then that's probably because your code generated an error, which will cause a text/html mime-type.
It exists for no other purpose than running temporary code. You won't break anything by putting your code in there.

Just write your code into the execute_temp function, load up the file by URL, and the code will run. Then delete your code when you're done (actually that's optional, unless the code is dangerous in some way and should never be run again by a hacker – so you can keep the code around a bit if you want to use it again later).