Using Admin Attributes in a List

Advanced Questions & Problems

Using Admin Attributes in a List

Postby pamperedlist » 6:33pm, Fri 04 Aug, 2006

I'd like to be able to pass owner-level attributes to an entire list.

For example, if created admin attributes like

[listowner name]
[listowner phone]
[listowner email]

I could use then use these special attributes within a template which gets used in multiple lists owned by multiple admins. The list subscribers would automatically see the contact info for the owner of their list.

Any change PHPlist can do something like this? I was hoping this was what admin attributes were for, but so far I haven't been able to make them work this way, and there is very little documentation or discussion about them...?

Thanks,

Mike
pamperedlist
PL Nut
 
Posts: 18
Joined: 6:23pm, Fri 04 Aug, 2006

Postby pamperedlist » 12:15am, Sun 06 Aug, 2006

Spent much of yesterday and today trying to learn anything I can about administrator attributes with not much success.

It would seem that the idea behind them would easily solve my question (i.e. that of passing owner attributes in a message to a list owned by that owner)

Does anyone use administrator attributes?

I'd really appreciate any help or ideas anyone has...?

Thanks,

Mike
pamperedlist
PL Nut
 
Posts: 18
Joined: 6:23pm, Fri 04 Aug, 2006

Postby pamperedlist » 4:22am, Sun 06 Aug, 2006

Well, I did some more poking around, and I see that on the Administrator Attributes page it does say:

No Attributes have been defined yet

Even though right under those words are three attributes I've defined. And when I look at the details for any one of the sample administrators I've created, the attributes (and their values) show up.

So I'm guessing that somehow the administrator attributes aren't being passed to the placeholders, even though the placeholders have been defined.

Does anyone else have this problem?

I'm trying to show that I'm not just waiting around for someone else to solve this for me, but am actively trying to solve it. If anyone more familiar with the program and/or code has any advice for me, I'd really appreciate it.

Thanks,

Mike
pamperedlist
PL Nut
 
Posts: 18
Joined: 6:23pm, Fri 04 Aug, 2006

Postby pamperedlist » 5:43am, Sun 06 Aug, 2006

OK, I finally found (by text-searching through the actual PHP code files) what looked like a helpful text message in preparemessage.php, which said to use the format:

[LISTOWNER.ATTRIBUTE]

to send administrator attributes. Sounds great; after a few failed attempts with mistakenly using lower-case attribute names and including number characters in the names, I successfully managed to get the system to replace braced attributes with...empty space!

At least it's progress...

Any ideas? Anyone? Bueller?
pamperedlist
PL Nut
 
Posts: 18
Joined: 6:23pm, Fri 04 Aug, 2006

Postby jeisson » 6:30pm, Wed 09 Aug, 2006

did u figure it out? started trying to do this and it doens't work
jeisson
phpLister
 
Posts: 9
Joined: 2:37pm, Wed 26 Jul, 2006

Another call for some clarification here

Postby sndrMartijn » 5:50pm, Mon 02 Oct, 2006

I too have been looking at this.

What I want to do is create more robust templates than just having a CONTENT field. From digging around the documentation I got the idea that Administrator Attributes would give me the ability to do something like this. For example - if i have a template that always uses an image in the header but it's different for every mailing I would like to have a field in the mailing for Header Logo: where the admin enters the url of the image. Then in the template I put <img src="[HEADERLOGO]"> and that replacement happens. However when I added the Administrator Attribute it doesn't ask me for input anywhere that I can find. Is this the right way to do it or is there another way?

If this isn't possible I can probably figure out another way, such as having a directory structure /images/listID/date/logo.jpg but I've seen something similar before and it's very difficult to manage.

I would really like to see templates made into real templates here and not just an email with a single editable field...[/code]
sndrMartijn
phpLister
 
Posts: 5
Joined: 5:40pm, Mon 02 Oct, 2006

never mind

Postby sndrMartijn » 6:02pm, Mon 02 Oct, 2006

never mind... i finally found where the values for the attributes are put in - in each admin's area. That's not useful to me at all, doesn't do what I was hoping for. I'm not going to bother testing it so I can't answer the previous user's questions because for my uses this is a completely pointless feature.

back to the drawing board.
sndrMartijn
phpLister
 
Posts: 5
Joined: 5:40pm, Mon 02 Oct, 2006

Postby pamperedlist » 8:23pm, Mon 02 Oct, 2006

The admin attributes work as you would expect them to IF you install and use the old "prepare a message" and "send a prepared message" code.

I set it up about two months ago and while it is slightly more cumbersome to use than the newer message sending area, it does solve the problem of sending listowner-specific placeholder information.

Search for 'admin attributes' related posts and you'll find what you're looking for; I've already forgotten how I actually set up it (once it works, stop worrying about it, right?)...

Good luck,

Mike
pamperedlist
PL Nut
 
Posts: 18
Joined: 6:23pm, Fri 04 Aug, 2006

Postby H2B2 » 3:56am, Tue 10 Apr, 2007

pamperedlist wrote:The admin attributes work as you would expect them to IF you install and use the old "prepare a message" and "send a prepared message" code.

For those wondering, this is the thread referred to: http://forums.phplist.com/viewtopic.php?p=14545
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Postby erin3 » 9:57pm, Wed 02 Jan, 2008

Thread 14545 doesn't exist anymore, but apparently it's a known issue (and has been for some time now) that adminattributes do not work any more.
:cry:

Check out:
http://forums.phplist.com/viewtopic.php?t=9215
Which references:
http://mantis.phplist.com/view.php?id=5460

I don't want to try and roll back to the old code, but if anyone knows of any other hacks or progress on this issue, that would be very helpful.
At the very least, perhaps the docs ( http://docs.phplist.com/AdminAttributesInfo ) should be updated accordingly?
erin3
phpList newbie
 
Posts: 2
Joined: 9:32pm, Wed 02 Jan, 2008

Postby schebl » 4:48pm, Wed 27 Feb, 2008

I found the reason. The [LISTOWNER.ATTRIBUTE] placeholder works fine, but the function sendEmail didn't know the owner.

in admin\sendemaillib.php
insert the folowing line in the cache message block maillib.php (approx. L:81)

Code: Select all
$cached[$messageid]["owner"] = $message["owner"];


and change L:153 from
$listowner = 0;
to
$listowner = $cached[$messageid]["owner"];
schebl
phpList newbie
 
Posts: 2
Joined: 12:23pm, Thu 21 Feb, 2008

Postby Guest » 10:49am, Tue 14 Oct, 2008

I am the only admin and would like to send out prepared messages to news lists I add to the site and so I don't need to use [LISTOWNER.ATTRIBUTE] placeholder. I have successfully added a prepared message and in phpMyAdmin set the status as 'prepared'. When I choose what list I would like to send the prepared message to I get the following message "Message Queued for sending" and when I click on "process queue" the message says that there are no messages to process.

I have tried to change the code in sendemaillib.php as suggested above but this doesn't solve the problem. Can anyone help? Thanks.
Guest
 

Re: Using Admin Attributes in a List

Postby NCTinkerer » 5:45am, Mon 06 Jan, 2014

Is this still a problem in the newest version? I just upgraded to 3.0.5 and have now lost the capability to include Admin Attributes in messages. I looked in the sendemaillib.php to make the changes that fixed it several years ago, but it seems the format has changed. Does anyone know how best to get Admin Attributes to show up in messages????
NCTinkerer
phpLister
 
Posts: 5
Joined: 7:55pm, Mon 05 Mar, 2012

Re: Using Admin Attributes in a List

Postby danwaterloo » 3:53am, Mon 13 Jan, 2014

I think it's as simple as putting the name of the attributes in brackets, in the email body. For instance,
[FirstName] [LastName]

would substitute the FirstName and LastName values for the 'placeholders'.
danwaterloo
PL Master
 
Posts: 276
Joined: 3:51am, Wed 30 Oct, 2013
Location: http://www.phplistsupport.com


Return to Advanced Questions & Problems

Who is online

Users browsing this forum: No registered users and 1 guest