TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

March 28, 2024, 09:02:10 AM

Login with username, password and session length

Recent posts

#1
Support / Re: Change defaults for articl...
Last post by tino - March 27, 2024, 05:16:06 PM
Quote from: davo88 on March 27, 2024, 06:29:40 AMWow... thanks guys. That's a very handy little mod. It's great that TP has so many article options, but they can become a bit tedious when posting a stack of articles. I added a bit of info to the Article Defaults topic in case anyone else is wondering how it works.

Thanks, I do have a habit of just doing something as a proof of concept then never documenting it!
#2
Support / Re: Change defaults for articl...
Last post by davo88 - March 27, 2024, 06:29:40 AM
Wow... thanks guys. That's a very handy little mod. It's great that TP has so many article options, but they can become a bit tedious when posting a stack of articles. I added a bit of info to the Article Defaults topic in case anyone else is wondering how it works.
#3
Support / Re: Change defaults for articl...
Last post by @rjen - March 27, 2024, 06:21:01 AM
Jeez, missed the defaults in TportalAdmin.php completely...

Must be having an off-day
#4
Support / Re: Change defaults for articl...
Last post by @rjen - March 26, 2024, 09:00:28 PM
#5
Support / Re: Change defaults for articl...
Last post by tino - March 26, 2024, 08:54:40 PM
I think I did a package for wildenborch which used a hook to set different defaults. I can't find it currently but it's an attachment on here.
#6
Support / Re: Change defaults for articl...
Last post by @rjen - March 26, 2024, 07:34:29 PM
Had a look into that before, but it is not easy to set that the way these variables are set.
I cannot help with this
#7
Support / Change defaults for article vi...
Last post by davo88 - March 25, 2024, 06:44:08 PM
I have many articles to enter (100+ initially, then ongoing) and am wondering if it is possible to edit a TP template to change the default 'Viewing options'. Currently the defaults are mainly all 'on'.
You cannot view this attachment.

It would save a lot of clicking around if I could edit and set them to my preferred state as shown below.
You cannot view this attachment.

I had a look at TParticle.template.php but it's to complex for me to follow.
#8
Support / Re: Disable the PHP eval funct...
Last post by tino - March 15, 2024, 10:30:39 PM
eval in PHP is as you've mentioned avoided if possible. In some situations you have to use it as there isn't an alternative, block codes for instance use it and there isn't an alternative. However all the other functionality built in to the templates logic can run without it so you can disable it for those instances.
#9
Support / Disable the PHP eval function ...
Last post by davo88 - March 15, 2024, 08:02:41 PM
Just wondering if someone could explain in simple terms, in what circumstances would you have the setting 'Disable the PHP eval function for templates' turned on, and in what circumstances would you turn it off.
I don't write PHP code myself so I don't really understand it. But I do use PHP written by others. From what I read in the PHP manual (see below), it seems to be enabled by default as protection against malicious code (?). If articles are only being posted by admins, is there some flexibility or advantage to be gained by turning it off?
Any explanations appreciated.
 
The php manual says:
QuoteEvaluates the given code as PHP.

The code being evaluated inherits the variable scope of the line on which the eval() call occurs. Any variables available at that line will be available for reading and modification in the evaluated code. However, all functions and classes defined will be defined in the global namespace. In other words, the compiler considers the evaluated code as if it were a separate included file.

Caution
The eval() language construct is very dangerous because it allows execution of arbitrary PHP code. Its use thus is discouraged. If you have carefully verified that there is no other option than to use this construct, pay special attention not to pass any user provided data into it without properly validating it beforehand.
#10
Block Codes / Re: Recent Topics/Posts with P...
Last post by @rjen - February 25, 2024, 09:07:36 PM
Thanks, will check it out