| Anonymous | Login | Signup for a new account | 21-11-09 02:11 GMT |
| Main | My View | View Issues | Change Log | Roadmap | Docs |
| Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Print ] | |||||||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
| 0008970 | [phplist] Template Management | minor | always | 18-01-07 01:04 | 11-08-08 06:55 | |||||||
| Reporter | danatang | View Status | public | |||||||||
| Assigned To | ||||||||||||
| Priority | normal | Resolution | open | |||||||||
| Status | new | Product Version | 2.10.4 | |||||||||
| Summary | 0008970: multiple contents placeholder for template and my solution | |||||||||||
| Description |
Many of my administrators request multiple contents in template, so I made my solution as below: in sendemaillib.php line:192 (original code) /////////////////////////////////////////// if ($cached[$messageid]["template"]) # template used $htmlmessage = eregi_replace("\[CONTENT\]",$htmlcontent,$cached[$messageid]["template"]); else { # no template used /////////////////////////////////////////// And my solution is: /////////////////////////////////////////// if ($cached[$messageid]["template"]){ # template used $arr_content = preg_split('#\[CONTENT\]#', $htmlcontent, -1, PREG_SPLIT_NO_EMPTY); $len = count($arr_content); $i=0; while($i < $len) { if($i == 0) $pattern = "#\[CONTENT\]#"; else $pattern = "#\[CONTENT".$i."\]#"; $cached[$messageid]["template"] = preg_replace($pattern,$arr_content[$i],$cached[$messageid]["template"]); $i++; } $htmlmessage = $html_link.$cached[$messageid]["template"]; }else { # no template used /////////////////////////////////////////// The usage of multiple contents template is attached. Besides, you can add any more contents as you need, just follow the usage. My administrators are using the new feature very well, I do hope the improvement is helpful for all of you. If possible, the enhancement can be added to the next version of phplist. |
|||||||||||
| Additional Information | ||||||||||||
| Tags | No tags attached. | |||||||||||
| Attached Files |
|
|||||||||||
|
|
||||||||||||
Relationships |
||||||
|
||||||
| Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |