[mod] How do you set the default format to Text only?

3rd party code for pl

Moderators: Dragonrider, J_S, Hernol, vancoovur, H2B2, Heritage

Postby Cyric_ » 10:45am, Thu 13 Sep, 2007

phplist v 2.10.4
in "send a message" > "format" tab to have "HTML" checked by default instead of "text and HTML" :

file send_core.php :
line 75
Code: Select all
Sql_Query(sprintf('insert into %s (subject,status,entered,sendformat,embargo,repeatuntil,owner,template,tofield,replyto)
    values("(no subject)","draft",now(),"text and HTML",now(),now(),%d,%d,"","")

replace "text and HTML" with "HTML"

line 1007 add || !isset($_POST["sendformat"])to get this code :
Code: Select all
$formatting_content .= $_POST["sendformat"]=="HTML" || !isset($_POST["sendformat"]) ?"checked":"";


line 1021 delete || !isset($_POST["sendformat"]) to get
Code: Select all
$formatting_content .= $_POST["sendformat"]=="text and HTML"?"checked":"";


to get text checked by default it's almost the same
Cyric_
phplister
 
Posts: 6
Joined: 8:28am, Wed 05 Sep, 2007

Postby H2B2 » 10:10pm, Thu 13 Sep, 2007

Nice mod Cyric_, and thanks for sharing. Would be a good idea to add a reference to your mod in the docs: http://docs.phplist.com/PhplistHacks
Feel free to to add it yourself.
H2B2
phpList Guru
 
Posts: 5890
Joined: 1:51am, Wed 15 Mar, 2006

Postby Cyric_ » 11:06am, Tue 18 Sep, 2007

done :)

cheers !
Cyric_
phplister
 
Posts: 6
Joined: 8:28am, Wed 05 Sep, 2007


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

Who is online

Users browsing this forum: No registered users and 0 guests