Monday, October 18, 2010
Typo3 nbo_podcast Modifications for External Servers
OK, here's another Typo3 modification.
The nbo_podcast extension is a great extension for creating your own podcast, except for one tinsy little issue. It insists on adding the site URL to the start of all uid's (ie file names).
This is OK if you are hosting ALL of your mp3's or mpg's on your server, but sometimes, you have a file size limit, just like I did.
I wanted to host small files on my typo3 server and my large files on another server, but the extension wouldn't let me.
Here's the fix if you want to do this.
In your typo3 backend, go to the extension manager.
Click on the Typo 3 Podcast link (should be under Front End Plugins)
In the dropdown box at the top, select Edit Files
Click on "Edit File" next to mod1/index.php
About half way down in the section that starts with
// Check MySQL ressource
Look for the line that says this
$sourceFile = $this->prepare_url(t3lib_div::getIndpEnv('TYPO3_SITE_URL').($not4 ? $episode['file']['vDEF'] : $episode['file']['vDEF']['xml-value']));
Change it to this
$sourceFile = $this->prepare_url(($not4 ? $episode['file']['vDEF'] : $episode['file']['vDEF']['xml-value']));
Save the file and now the plug in will accept external url's without automatically appending your site URL to them.
There is a small downside to this. You will need to manually enter your site URL for any files hosted on your typo3 server, within the File List, after you use the browser to select them, though this is a pretty minor inconvenience.
The nbo_podcast extension is a great extension for creating your own podcast, except for one tinsy little issue. It insists on adding the site URL to the start of all uid's (ie file names).
This is OK if you are hosting ALL of your mp3's or mpg's on your server, but sometimes, you have a file size limit, just like I did.
I wanted to host small files on my typo3 server and my large files on another server, but the extension wouldn't let me.
Here's the fix if you want to do this.
In your typo3 backend, go to the extension manager.
Click on the Typo 3 Podcast link (should be under Front End Plugins)
In the dropdown box at the top, select Edit Files
Click on "Edit File" next to mod1/index.php
About half way down in the section that starts with
// Check MySQL ressource
Look for the line that says this
$sourceFile = $this->prepare_url(t3lib_div::getIndpEnv('TYPO3_SITE_URL').($not4 ? $episode['file']['vDEF'] : $episode['file']['vDEF']['xml-value']));
Change it to this
$sourceFile = $this->prepare_url(($not4 ? $episode['file']['vDEF'] : $episode['file']['vDEF']['xml-value']));
Save the file and now the plug in will accept external url's without automatically appending your site URL to them.
There is a small downside to this. You will need to manually enter your site URL for any files hosted on your typo3 server, within the File List, after you use the browser to select them, though this is a pretty minor inconvenience.
Labels: Typo3
Wednesday, January 30, 2008
Typo3 Page Statistics
[Listening to: Trance Lab Radio - 1 October 2007 - Lord Bass - The Trance Lab with Lord Bass (1:56:12)]
OK - solved another little Typo 3 headache today.
If the Page Statistics Plugin is installed it's necessary to add some code to your template/s to make it work.
You need to add this
page.headerData.100 < plugin.tx_kestats_pi1 to the SETUP section of your template. It doesn't seem to work if you put it in the Constants Section.
Probably best to type this in rather than copy - paste due to using escape characters to display <. Webpages think it's opening a tag otherwise.
Select Template, then Edit Whole Template Record, when you are in the Info/Modify Page (which is selected from the drop down box in the top right of the window).
Labels: Typo3
Friday, September 21, 2007
Typo 3 Direct Mail Subscription Templates and Getting them Damn Categories to work.
[Listening to: Amen - Astral Projection - Amen (6:02)]
After spending about a day and a half searching the internet for information on how to get category's to work in Typo3's Direct Mail module, I've finally worked it out.
This applies to Typo3 installations with Direct Mail 2.0.0 or higher and with Direct Mail Subscription 1.1.0
Categories are now stored in a database, rather than how they were previously. The categories themselves are still defined in the old way, and in my case I've got them in a system folder (the id is 54) which will help in deciephering all of the code that's coming up.
On backend pages where you want the categories list to appear you will need to put this in the Page TS Config window (you can find this by going to the Edit Page Properties on the page required.
TCEFORM.tt_content.module_sys_dmail_category.PAGE_TSCONFIG_IDLIST = 54
TCEFORM.tt_address.module_sys_dmail_category.PAGE_TSCONFIG_IDLIST = 54
TCEFORM.fe_users.module_sys_dmail_category.PAGE_TSCONFIG_IDLIST = 54
TCEFORM.sys_dmail_group.select_categories.PAGE_TSCONFIG_IDLIST = 54
TCEFORM.tt_content.module_sys_dmail_category.disabled = 0
TCEFORM.tt_address.module_sys_dmail_category.disabled = 0
TCEFORM.fe_users.module_sys_dmail_category.disabled = 0
TCEFORM.sys_dmail_group.select_categories.disabled = 0
You will also need the line
config.insertDmailerBoundaries = 1
In the Direct Mail Folder, but in the TS Setup property. Installing the static template "Direct Mail Content Boundaries" though, should do this automatically for you.
I've got a bunch of other stuff in mine as well, that's working, so if you have this in, and it doesn't work, let me know, and I'll post the full stuff that's in mine.
For frontend pages where you want the subscriber information I've got this in my Page TS Config.
TCEFORM.tt_content.module_sys_dmail_category.PAGE_TSCONFIG_IDLIST = 54
TCEFORM.tt_address.module_sys_dmail_category.PAGE_TSCONFIG_IDLIST = 54
TCEFORM.fe_users.module_sys_dmail_category.PAGE_TSCONFIG_IDLIST = 54
TCEFORM.sys_dmail_group.select_categories.PAGE_TSCONFIG_IDLIST = 54
plugin.feadmin.dmailsubscription.cObjects.CATLIST.pid = 54
I'm not sure if you need the first 4 lines, but the last one is important. It tells the page where to find the categories.
You need to get rid of whatever was in the TS Config box before, because it stops the new one from working properly.
You need to set a template (or at least a template extension) for this page that includes the Direct Mail Content Boundaries Static Template.
You will also need a new tmpl file. The old one simply won't work with the new categories. It will display on the page like it used to, and it will appear to work, but the front page categories won't line up with the new back end categories, and that's kinda the whole point.
To fix it, you will need to add in
[BR]
###CE_CATLIST###
[BR](replacing the [ and ] with the angled equivalents.
This will need to go in place of the existing category list (ie the bit that looked a bit like)
[br]
[b]Select Special Categories:[/b][BR]
[table]
[tr]
[td]###GW2B###Corporate###GW2E###[/td][td][input type="checkbox" name="FE[tt_address][module_sys_dmail_category][0]"][/td]
[/tr]
[tr]
[td]###GW2B###Technical###GW2E###[/td][td][input type="checkbox" name="FE[tt_address][module_sys_dmail_category][1]"][/td]
[/tr]
[tr]
[td]###GW2B###Announcements###GW2E###[/td][td][input type="checkbox" name="FE[tt_address][module_sys_dmail_category][2]"][/td]
[/tr]
[/table]
[BR]
There is a new template file included with the latest installations, that you can download from the Typo3 repository (go to http://typo3.org/extensions/repository/list/direct_mail_subscription//info/ext_typoscript_setup.txt/ and download the .tmpl file.)
Note that there is still an error in this new file, and that you'll need to edit this file to fix the Edit Profile links. It's still configured for the old module, not the new one. The simplest way is to search for "Edit profile" and put in the ###CE_CATLIST### entry instead of the Special Categories table.\
You'll probably want to edit the email templates near the bottom of this file as well, so that it is more suited your site (ie change the email subject and contents.)
Once you've made the changes you will need to upload the .tmpl file. This is done on the template page for the page where you want it (or wherever you have the direct mail subscription template setup). Browse and upload.
To change the email address and name that the email is sent from go to the template extension and set the constants in the Direct Mail Subscription section.
The Direct Mail Tutorial is still the easiest way to get this incredibly powerful mailing list running, though you'll need the information above for setting the categories, rather than the tutorial file. The manual is useful for the backend stuff, but tells you nothing about the frontend subscription.
The next thing to do is to tie all of this in with the tt_news plugin, but I might leave that for another day.
Hope this is helpful, and I hope this finds it's way sufficiently up the google list for it to be genuinely useful. If you have any comments, corrections, or questions, please add a comment.
Labels: Direct Mail, Typo3

