@Phyll I’m not sure that currently admin attributes are usable. See this bug report that I raised a few years ago. https://mantis.phplist.org/view.php?id=16707
From what I can see nothing has changed, but you might want to try to use the syntax that seemed to work then.
Thank you, DuncAnc, for answering. Checked out the resource you referenced.
I tried the approach noted in
##LISTOWNER=1
[LISTOWNER.NAME]
Unfortunately, it didn’t work.
Even though I added these lines (or my equivalent) in Source code method of Content editing, it put paragraph tags around the items. So, I guess code saw ##LISTOWNER=… line as html, not as a variable.
However, later on in the report you mentioned, I see the following…which indicates the capacity is NOT functioning, I presume.
The "##LISTOWNER=1" was added in the
"Prepare a message" system, which is disfunctional. It was never meant
to be added manually by the person who is sending the campaign.
Question I’d ask would be – why put in Config > Configure Administrative Attributes in actual nicely coded menu – if you’re not going to be able to USE those attributes?
However, I appreciate your answer! It’s not horrible to hand-enter values (instead of variables) in the Content editor…just seems a pity.
I won’t pursue “discovering the secret” – if there’s no secret to discover!
@Phyll I have just been working on a proper solution for this, as described in the Mantis report. Replace admin attribute placeholders only when all the lists being sent to are owned by the same admin.
Hopefully it will be included in the next release, but if you want to modify the phplist code (just one file) then you should get a workable solution.
Okay, DunAnc, I have high hopes! I replaced the file, and didn’t see the replacement…yet.
BUT…I also note that in editing content, EVEN THOUGH I click Source button, and remove paragraph tags
around the placeholder you mention…and save…the editor is still putting those paragraph tags right back in.
Is there some “secret sauce” that will keep the paragraph tags out?
Think that’s the final step to achieving administrator attributes.
Thanks for taking the time to send me the url to the file. Sorry I didn’t implement this earlier. Whoops!
I didn’t ask which phpList version is installed, it probably needs to be the latest, 3.2.4.
But I didn’t understand your last reply. The editor will ensure that valid html is generated, so a piece of text must be within a block-level tag. But p tags surrounding a placeholder won’t affect the replacement.
Are you saying that the placeholder is not replaced?
I now understand that I can put in the placeholder within HTML. Got confused about Source, etc. because in Wordpress, I’m used to Text and Visual tabs where shortcodes must be in particular place.
I AM only seeing the TEXT of the placeholder, not seeing the replacement VALUE.
Here’s my PHP version:
PHP version: 5.4.45
Am I looking at the wrong thing?
Are there any places in the PHP file where I should put in echoes to pinpoint my problem?
BTW, I just tested again and compared the attribute spelling, etc. to what is in the template. Is the same. Get email, but value not filled in.
Also…I “lost you” in my email and that’s why this has taken so long to get back to you!
@Phyll I had not realised but the placeholder needs to be in the message content, not in the template. That’s not so useful so I will have to look at how to change that.