ocPORTAL / Composr install & modify tips

Let us talk about scripts, HTML, Perl, PHP, apache, etc.
User avatar
Stevyn
SysOp
Posts:1786
Joined:Mon Nov 09, 2009 10:03 am
Location:Japan
Contact:
Re: ocPORTAL / Composr install & modify tips

Post by Stevyn » Mon Sep 18, 2017 7:52 pm

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}
Contact me directly: Ironfeatherbooks (@) gmail.com

Image

User avatar
Stevyn
SysOp
Posts:1786
Joined:Mon Nov 09, 2009 10:03 am
Location:Japan
Contact:

Re: ocPORTAL / Composr install & modify tips

Post by Stevyn » Sun Apr 01, 2018 9:47 pm

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.
Contact me directly: Ironfeatherbooks (@) gmail.com

Image

User avatar
Stevyn
SysOp
Posts:1786
Joined:Mon Nov 09, 2009 10:03 am
Location:Japan
Contact:

Re: ocPORTAL / Composr install & modify tips

Post by Stevyn » Mon Feb 04, 2019 2:23 pm

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?
Contact me directly: Ironfeatherbooks (@) gmail.com

Image

User avatar
Stevyn
SysOp
Posts:1786
Joined:Mon Nov 09, 2009 10:03 am
Location:Japan
Contact:

Re: ocPORTAL / Composr install & modify tips

Post by Stevyn » Sat Feb 09, 2019 4:21 pm

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
Contact me directly: Ironfeatherbooks (@) gmail.com

Image

User avatar
Stevyn
SysOp
Posts:1786
Joined:Mon Nov 09, 2009 10:03 am
Location:Japan
Contact:

remove "FEATURES" from mobile template

Post by Stevyn » Sun Feb 17, 2019 12:44 pm

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>
Contact me directly: Ironfeatherbooks (@) gmail.com

Image

User avatar
Stevyn
SysOp
Posts:1786
Joined:Mon Nov 09, 2009 10:03 am
Location:Japan
Contact:

test / run code temp for testing in Composr

Post by Stevyn » Sun Feb 24, 2019 12:13 pm

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).
Contact me directly: Ironfeatherbooks (@) gmail.com

Image

Post Reply