Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#121 2017-01-21 08:36:42

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,639
Website

Re: smd_macro: Create custom virtual Txp tags that do stuff

phiw13 wrote #303640:

it would be nice if you could publish an up-to-date version of this plugin

Done. I’ll update the OP too. Slacking, sorry.

I found the MySQL table bug yesterday while testing the macro above and was just checking to see if I could find any more before releasing a new version. Think it’s okay now, but please let me know if you find anything else.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#122 2017-01-21 09:38:55

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,041
Website

Re: smd_macro: Create custom virtual Txp tags that do stuff

Bloke wrote #303641:

Done. I’ll update the OP too. Slacking, sorry.

Thank you!

So far, no other major issue to report. The plugin imports your macro above and it works; I created a small macro based on the examples in the help file, everything works fine. As far as I can tell! as I have to familiarise again with the plugin.


Where is that emoji for a solar powered submarine when you need it ?

Offline

#123 2017-08-22 14:36:57

david@druna.cz
Member
Registered: 2017-07-25
Posts: 41

Re: smd_macro: Create custom virtual Txp tags that do stuff

I was looking forward to this plugin but when I enter the macro i says Macro name not valid no matter what I enter. I did not install any other plugins. Might be some missing dependencies? I downloaded the latest plugin version listed here and I am running TXP 4.6.2.

Offline

#124 2017-08-22 15:35:16

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,639
Website

Re: smd_macro: Create custom virtual Txp tags that do stuff

david@druna.cz wrote #306705:

when I enter the macro i says Macro name not valid no matter what I enter.

Your macro name is a single word, right? Or one that uses underscores? The Name becomes your new tag so it must conform to standard naming policy. e.g. you could name it gallery or img_list or batman_and_robin if you like. But not Image gallery or Batman and Robin.

From the plugin docs:

IMPORTANT: your tag MUST adhere to the following conventions:

  • an ASCII name — no foreign characters, hyphens or anything other than alphanumeric characters and underscores. In addition it may not begin with a number.
  • double check before saving that your tag does not have the same name as an existing Txp or PHP function. If it does, your site WILL blow up with nasty errors. The best way to avoid this is to make sure you prefix your tags with a three-letter prefix, just as you would if this was your own plugin.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#125 2017-08-24 17:45:28

david@druna.cz
Member
Registered: 2017-07-25
Posts: 41

Re: smd_macro: Create custom virtual Txp tags that do stuff

I tried every name possible including “abcd” and the message is always the same.

Bloke wrote #306706:

Your macro name is a single word, right? Or one that uses underscores? The Name becomes your new tag so it must conform to standard naming policy. e.g. you could name it gallery or img_list or batman_and_robin if you like. But not Image gallery or Batman and Robin.

Last edited by david@druna.cz (2017-08-24 17:45:43)

Offline

#126 2017-08-29 11:56:49

david@druna.cz
Member
Registered: 2017-07-25
Posts: 41

Re: smd_macro: Create custom virtual Txp tags that do stuff

Is there really nothing that can be done about it?

Bloke wrote #306706:

Your macro name is a single word, right? Or one that uses underscores? The Name becomes your new tag so it must conform to standard naming policy. e.g. you could name it gallery or img_list or batman_and_robin if you like. But not Image gallery or Batman and Robin.

Offline

#127 2017-08-29 12:31:04

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,639
Website

Re: smd_macro: Create custom virtual Txp tags that do stuff

david@druna.cz wrote #306766:

Is there really nothing that can be done about it?

I’m not sure what else to suggest. It works fine on a vanilla 4.6.2 install for me so I’m not sure what could be going wrong. Any major issues listed in your Admin->Diagnostics panel? No stale code running from the browser cache?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#128 2017-08-31 22:40:43

david@druna.cz
Member
Registered: 2017-07-25
Posts: 41

Re: smd_macro: Create custom virtual Txp tags that do stuff

Diagnostic were saying TXP cannot write into temp folder so I gave it permissions. The problems persist. There is another warning that there are various function turned off in the environment. That might be it! Im in communication with the host to turn it on. Quote of the warning in czech:

Následující funkce PHP byly na serveru vypnuty (ale mohou být nezbytné pro Textpattern): fbase64_decode, eval, fcurl_exec, curl_multi_exec, parse_ini_file, show_source, php, perl, apache_setenv

Bloke wrote #306768:

I’m not sure what else to suggest. It works fine on a vanilla 4.6.2 install for me so I’m not sure what could be going wrong. Any major issues listed in your Admin->Diagnostics panel? No stale code running from the browser cache?

Offline

#129 2017-09-01 08:49:08

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,639
Website

Re: smd_macro: Create custom virtual Txp tags that do stuff

david@druna.cz wrote #306807:

The following PHP features have been disabled on the server… eval, …, parse_ini_file, …, php, …

Whaaat! php is disabled? It can’t mean that!

The parse_ini_file and eval functions are both used by this plugin. However, parse_ini_file should only be used when importing macros (and it silently fails if it can’t) so that shouldn’t be the issue. eval is used when interpreting the macro content, so it’s kinda vital. But only used on the public side, so it shouldn’t affect the issue you’re seeing here. This is baffling.

EDIT: you do have full permissions for your user that you’re running the macro plugin as, right? In theory it should only run for Publisher and Managing Editor accounts, but there may be an issue with the plugin where it renders the interface but can’t complete some later functions (like save). If that’s the case, I’ll have to fix it.

Last edited by Bloke (2017-09-01 08:52:43)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#130 2017-09-01 18:34:27

david@druna.cz
Member
Registered: 2017-07-25
Posts: 41

Re: smd_macro: Create custom virtual Txp tags that do stuff

Hurray! The admin enabled some of the features and it started working (I can create the macro, I have yet to test it further). It event fixed other issues – I could not create new sections before. There are still some missing features I hope I can do without them for some time. Current message is:

Následující funkce PHP byly na serveru vypnuty (ale mohou být nezbytné pro Textpattern): fbase64_decode, fcurl_exec, curl_multi_exec, fparse_ini_file, show_source, php, perl, apache_setenv

Bloke wrote #306812:

Whaaat! php is disabled? It can’t mean that!

The parse_ini_file and eval functions are both used by this plugin. However, parse_ini_file should only be used when importing macros (and it silently fails if it can’t) so that shouldn’t be the issue. eval is used when interpreting the macro content, so it’s kinda vital. But only used on the public side, so it shouldn’t affect the issue you’re seeing here. This is baffling.

EDIT: you do have full permissions for your user that you’re running the macro plugin as, right? In theory it should only run for Publisher and Managing Editor accounts, but there may be an issue with the plugin where it renders the interface but can’t complete some later functions (like save). If that’s the case, I’ll have to fix it.

p.

Offline

Board footer

Powered by FluxBB