[plugin] PBTS_XTRA - Mulitple Content Areas in Template

3rd party code for phpList

Postby carterco » 9:15pm, Fri 10 Feb, 2006

I've not experienced this, before or after I hacked the dickens out of the code, so afraid my answer is "I don't know"... but, allow me to ask:

you are getting both, when?

1) when you send a test message?
2) when you send your message to a list?

If it's #1, then good news (for me): that's the behavior of phpList. One-off's under "send test message" send both Text and HTML, always. (I could tell you where to disable that in phpList's code... but there are reasons for what they do)

if it's #2, wouldn't you reconsider and say it is #1 instead? please?

Let me know. But on the record, I don't KNOW of any reason why it (installing the plug-n-patch pbts_xtra) would do this, it's wired into a fairly safe spot.
carterco
PL Geek
 
Posts: 76
Joined: 1:04am, Wed 12 Oct, 2005
Location: Pasadena, California, USA

Postby jwatts001 » 10:31pm, Fri 10 Feb, 2006

thanks for the reply...

haha, unfortunately it is #2, but FORTUNATELY, it didn't have anything to do with your plugin. i guess phpList has its radio buttons a little backwards, cause selecting "html only" sends both text and html, but selecting "text and html" sends html only!

i should probably post this elsewhere on the forums, cause i think i saw a few people having this issue.
jwatts001
phpList newbie
 
Posts: 3
Joined: 9:01pm, Fri 10 Feb, 2006

Postby carterco » 10:38pm, Fri 10 Feb, 2006

Ahhhhh....

I know EXACTLY what you're saying! Yes. Actually, if you whip out your magnifying lens, it isn't a bug in phplist, just an unfortunate UI choice. The radio buttons are on what, to nearly everyone's way of thinking, they are on the wrong side of the text. Would be much better if they were on separate lines. Quite confusing.

Glad it worked out and thanks for helping others out with this!
carterco
PL Geek
 
Posts: 76
Joined: 1:04am, Wed 12 Oct, 2005
Location: Pasadena, California, USA

Re: New plugin: Mulitple Content Areas in Template

Postby phpfan » 8:27pm, Sat 08 Apr, 2006

Hello, carterco.

I'm really excited about this plug-in. I'm tantalizingly close to getting it to work, but try as I might, when I send a test message to myself from the standard PHPList editor (that *is* the only way, isn't it?) or to a test mailing list, I get only the [PBTS_XTRA...] tags in the output message. When I preview the message in the pbts_xtra plug-in editor, it looks great, but when I use the standard PHPList functions to send it, something goes wrong.

More specifically, the output test email message has two parts. At the top of the message are all my PBTS tags in plain text with the values I entered for each. But the tag key word appears as [PBTS_EXTRA...], rather than [PBTS_XTRA...] as I entered them in my template (without the 'E'). Then the second part of the message is just my raw template with images embedded (and the tags written as [PBTS_XTRA...]).

Do you have any idea what's happening? Can you suggest something I should look at?

Thanks,

PHPFan
phpfan
phpLister
 
Posts: 10
Joined: 8:08pm, Sat 08 Apr, 2006
Location: Maryland, USA

Re: New plugin: Mulitple Content Areas in Template

Postby phpfan » 9:23pm, Sat 08 Apr, 2006

phpfan wrote:...but try as I might, when I send a test message to myself from the standard PHPList editor (that *is* the only way, isn't it?) or to a test mailing list, I get only the [PBTS_XTRA...] tags in the output message. When I preview the message in the pbts_xtra plug-in editor, it looks great, but when I use the standard PHPList functions to send it, something goes wrong.


Never mind! I discovered my error. When I did the edit of line ~183 in sendemaillib.php, which I did manually, I didn't see the underscore character right after "PBTS" in carterco's instructions. In other words, where I should have typed this:

if (!preg_match("/\[PBTS_/is",

I typed this instead:

if (!preg_match("/\[PBTS /is",

Adding the underscore solved my problem!

Live and learn.

PHPFan
phpfan
phpLister
 
Posts: 10
Joined: 8:08pm, Sat 08 Apr, 2006
Location: Maryland, USA

Fatal error after fresh install of newest phpList

Postby jwatts001 » 5:55pm, Tue 25 Apr, 2006

Hey Carterco,

I just did a fresh install of the newest version of phpList, and i've been transferring all my templates, configuration settings, mailing lists, etc. over, along with your awesome contribution.

Everything is set, but when i went to edit a message with the PBTS editor, i get the following error:

Code: Select all
Template:     
Fatal error: Call to a member function on a non-object in /{path}/public_html/elements/admin/plugins/pbts_xtra/pbts_msg.php on line 45


This is the code it's referrencing (lines 44-51 of pbts_msg.php)
Code: Select all
function pbts_writeTemplateSelect( $p_selected_id ){
   echo( "\n<select>\n<option>-- ".$GLOBALS['I18N']->get('selectone').'</option>' );
   $req = Sql_Query( "select id, title from ".$GLOBALS["tables"]["template"]." order by listorder" );
   while ($row = Sql_Fetch_Array($req)) {
      echo( sprintf('<option>%s</option>',$row["id"], $row["id"]==$p_selected_id?'SELECTED':'', $row["title"] ));
      }// while
   echo ('</select> (not enabled yet)');
   } // pbts_writeTemplateSelect


Any ideas?? Thanks a lot!!
jwatts001
phpList newbie
 
Posts: 3
Joined: 9:01pm, Fri 10 Feb, 2006

[PBTS_EXTRA] Tags in My Text-Only Output

Postby phpfan » 10:27pm, Mon 08 May, 2006

Does anyone have any ideas as to why my text-only emails are being output with the PBTS tags still intact? For example, I'm getting this:

[PBTS_EXTRA NAME="monthyear"]May 2006[/PBTS_EXTRA]

instead of just this:

May 2006

The corresponding HTML output looks fine.

Thanks,

PHPfan
phpfan
phpLister
 
Posts: 10
Joined: 8:08pm, Sat 08 Apr, 2006
Location: Maryland, USA

Postby JoaoMartins » 9:38am, Fri 21 Jul, 2006

Hello,

this is a great code, i like two view this functionality in core of phplist.

I make modifications in code, for include in default message editor. With may modifications, the "PBTS EDITOR", simple replace de textarea editor (fckeditor, TinyMCE, textarea), if the template selected contain PBTS tags, screen shot.
I remove de tab "format", and I placed the select of template, in the first tab because, the detection of "PBTS EDITOR".

I also include the option of htmlarea for type of a PBTS tag, and one function for customize the tag for editor (eg: fill one select with promotion from data base), and one function for customize de value of the tag for send email (eg: obtain the title, and description of the selected promotion, for email). these function are in a separate file to allow to be modified, without the risk to overlap with new versions of the extension.

Briefly i go place my modifications here, I am wait commentary, mainly of the author of this wonderful extension.
JoaoMartins
phpList newbie
 
Posts: 1
Joined: 4:25pm, Wed 19 Jul, 2006

image placeholder

Postby kev@num » 1:09pm, Tue 20 Feb, 2007

hello!! i was wondering if anyone can help, i think i've setup pbts correctly.. i can send myself test messages etc that display correctly..

however i've created a field where the person creating the message just types in a URL to an image.. for example:

http://opensource.org/trademarks/openso ... 5x65-t.png

now my question is, how to actually have the image show up in the HTML emails.. evertime i try and get this to work it simply shows the URL to the image in the email or nothing at all...

here's my standard conditional if code:

Code: Select all
[pbts_if condition="defined" name="rel1img"]
[PBTS_XTRA name="rel1mg" type="text" displayname="Release1img" required="no" size="60" rows="1" cols="60" paragraph="never" description="Full Image URL " style=""]
[/pbts_if]


i looked at the eample screenshots on the pbts site, but some of the code is off screen for this example :(

i thought i could change the code to this to make it work:

Code: Select all
[pbts_if condition="defined" name="rel1img"]
<img src=[PBTS_XTRA name="rel1mg" type="text" displayname="Release1img" required="no" size="60" rows="1" cols="60" paragraph="never" description="Full Image URL " style=""]">
[/pbts_if]


but it doesn't work.. has anyone got any ideas or answers or exmples?

thanks in advance :)
kev,
kev@num
phpLister
 
Posts: 9
Joined: 1:00pm, Tue 20 Feb, 2007

Check your variable (field) names: they don't match

Postby carterco » 7:13am, Fri 23 Feb, 2007

Wow, at first thought you'd found a bug... afraid you mystyped your field names:

The condition checks:
Code: Select all
r e l 1 i m g


whereas the field is defined as
Code: Select all
r e l 1 m g


I entered your fixed code (added the missing "i"), works fine!

Code: Select all
[pbts_if condition="defined" name="rel1img"]
[PBTS_XTRA name="rel1img" type="text" displayname="Release1img" required="no" size="60" rows="1" cols="60" paragraph="never" description="Full Image URL " style=""]
[/pbts_if]


let us know if this fixes the problem. Thanks for the email, glad you like it.
carterco
PL Geek
 
Posts: 76
Joined: 1:04am, Wed 12 Oct, 2005
Location: Pasadena, California, USA

Postby kev@num » 10:03am, Fri 23 Feb, 2007

wooohoo, amazing, (it works!) now i feel silly though, especially as i've checked that code more than ten times! :( Thanks again for your time and speedy help, i bow down to the phplist an pbts code again

:D

\m/
kev@num
phpLister
 
Posts: 9
Joined: 1:00pm, Tue 20 Feb, 2007

Postby OldJoe » 5:42pm, Thu 22 Mar, 2007

(I'm posting this here too, just in case carterco isn't checking his email)

Hi there,

I just recently installed PHPList and this plugin, but I am having one minor problem.

When I type in stuff into the "Main Content" area and send the mail, it outputs a ">" after every other linebreak, like this:

Text line 1
>

Text line 2
>

Text line3

And so on. Does anyone know what is causing this? I am currently using the sample template.

Thanks in advance for any help.


EDIT:

I think I know why this is happening (although I have no clue how to fix it):

You get the problem when:
1. Image Caption has apostrophes, but Main Content does not.
2. Main Content has apostrophes, but Image Caption does not.

Everything works fine if:
1. Image Caption and Main Content have no apostrophes.
2. Both Main Content and Image Caption has apostrophes.


It seems to occurr a bit random/sporadic sometimes. Any clue how on earth you could fix this?
OldJoe
phpLister
 
Posts: 5
Joined: 5:36pm, Thu 22 Mar, 2007

Template

Postby okker » 9:54am, Wed 04 Apr, 2007

Hello everyone,

I'm new tot PHP list and am trying to find out which hacks I need to get most out of phplist. One big disadvantage of phplist is the "one content" section so I think I'm really going to need this plugin if I want my clients to be able to place their own content without knowing much HTML.

I'm creating a table template (simple 3 cols layout) in GoLive. This template uses CSS for text markup. It's also being used to create divider lines between <p> tags.

Is it possible, with the use of the PBTS plugin, to put the PBTS-xtra tags in my template columns? And will the content created in phplist editor show the CSS I have put in the template?

Or do I use the xtra tags to create content (and columns???) in the orginal CONTENT section?

If it's the latter, I don't see why this plugin should be a useful solution to the one content problem...?

Does anybody know how it's actually being used within a tables template, or does anybody want to share an example template so I can see how I should use the tags?

Thank you so much for your help!

Irma
okker
phpLister
 
Posts: 13
Joined: 8:37am, Fri 23 Mar, 2007
Location: Netherlands

Postby okker » 11:18am, Thu 05 Apr, 2007

I have taken a look at the example template included in the download and that's basically answered my questions above... :oops:

But I have a new question. I know there's an option to enable or disable the use of <P> tags. Now I would like to be able to use both <P> and <BR> tags without actually editing the HTML code. Ehm... I would like my client to create <P> and <BR> without using HTML. Zo for a <P> I would hit return and for a <BR> I would hit SHIFT+return.

I've tried this in the text area field in the example template but it didn't work. Does anybody know how this can be achieved?

Thank you!

Irma
okker
phpLister
 
Posts: 13
Joined: 8:37am, Fri 23 Mar, 2007
Location: Netherlands

Postby kev@num » 12:15pm, Wed 25 Apr, 2007

hello again! i've got a quick question, i'm not sure if this is possible...

i want to include some text that is hosted online within the emails being sent out.. sortof like a phpinclude does anyone know if this is possible and how to do it?

could i put in the template code something like

<php>

or something else? I tried the above but can't get it to work..

thanks in advance for any help/tips/advice.

kev. :)
kev@num
phpLister
 
Posts: 9
Joined: 1:00pm, Tue 20 Feb, 2007

PreviousNext

Return to Contributions: Plug-ins, Add-ons, Mods

Who is online

Users browsing this forum: No registered users and 2 guests