|
View:
New views
19 Messages
—
Rating Filter:
Alert me
|
|
|
Changing appearance of tt_news file list iconsHi. I'm trying to change the icon used by icons in tt_news's file list. Someone suggested I look at the Typoscript for tt_news and this (along with the tsref) led me to write this: newsFiles { #As default path = uploads/media/ icon = 1 stdWrap.wrap = <dd>|</dd> # try and change all icons at first to a custom one... iconCObject.5 = IMAGE iconCObject.5 = { file.5 = IMG_RESOURCE file.5 = { file = fileadmin/templates/images/icons/pdf.png } } } newsFiles in the tt_news manual is of type filelink, and looking at that in the tsref I believe I must set the iconCObject property to type IMAGE, an then the file property I must make a IMG_RESOURCE. The file property of the IMG_RESOURCE is then (i assuem from what I can understand of the tsref) the path to the file. I've done something wrong though, as the icons use the same default ones as before. Can someone help me with the typoscript to achieve what I want? Or tell me what I have done wrong. Eventually when I can get it to use the pdf icon for every file type I want to try and get it to pick the icon based on the files type (like it now does automatically. ----- -- Stephen Bungert -- View this message in context: http://www.nabble.com/Changing-appearance-of-tt_news-file-list-icons-tp17865185p17865185.html Sent from the TYPO3 English mailing list archive at Nabble.com. _______________________________________________ TYPO3-english mailing list TYPO3-english@... http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english --
Stephen Bungert |
|
|
Re: Changing appearance of tt_news file list iconsHi,
On Mon, Jun 16, 2008 at 4:06 PM, StephenBungert <stephenbungert@...> wrote: > > Hi. I'm trying to change the icon used by icons in tt_news's file list. > > Someone suggested I look at the Typoscript for tt_news and this (along with > the tsref) led me to write this: > > newsFiles { > #As default > path = uploads/media/ > icon = 1 > stdWrap.wrap = <dd>|</dd> > > # try and change all icons at first to a custom one... > iconCObject.5 = IMAGE > iconCObject.5 = { > file.5 = IMG_RESOURCE > file.5 = { > file = fileadmin/templates/images/icons/pdf.png > } > } > } > > newsFiles in the tt_news manual is of type filelink, and looking at that in > the tsref I believe I must set the iconCObject property to type IMAGE, an > then the file property I must make a IMG_RESOURCE. The file property of the > IMG_RESOURCE is then (i assuem from what I can understand of the tsref) the > path to the file. > > I've done something wrong though, as the icons use the same default ones as > before. Can someone help me with the typoscript to achieve what I want? Or > tell me what I have done wrong. Eventually when I can get it to use the pdf > icon for every file type I want to try and get it to pick the icon based on > the files type (like it now does automatically. Your TS makes no sense :) The IMG_RESOURCE ***cObject*** and the imgResource ***function*** or ***data type*** are not the same thing. See the TSref for more details, but this should work: iconCObject.5 = IMAGE iconCObject.5 = { file = fileadmin/templates/images/icons/pdf.png } -- Christopher Torgalson http://www.typo3apprentice.com/ _______________________________________________ TYPO3-english mailing list TYPO3-english@... http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english |
|
|
Re: Changing appearance of tt_news file list iconsI thought not :-) I tried your code: plugin.tt_news { newsFiles { iconCObject = IMAGE iconCObject = { file = fileadmin/templates/images/icons/mail.gif } } } But I still see the original typo3 icons, the file exists and in the directory in the file property, but I still see the old icons. If I change it to: plugin.tt_news { newsFiles { stdWrap.wrap = <dd>Test|</dd iconCObject = IMAGE iconCObject = { file = fileadmin/templates/images/icons/mail.gif } } } I see the word test before each icon, so I know it has had an effect on the rendering of the file links in the article. So Whyy doesn't the icon change? --
Stephen Bungert |
|
|
Re: Changing appearance of tt_news file list iconsChristopher Torgalson wrote: > > > Your TS makes no sense :) > > The IMG_RESOURCE ***cObject*** and the imgResource ***function*** or > ***data type*** are not the same thing. See the TSref for more > details, but this should work: > > iconCObject.5 = IMAGE > iconCObject.5 = { > file = fileadmin/templates/images/icons/pdf.png > } > I thought not :-) I tried your code: plugin.tt_news { newsFiles { iconCObject = IMAGE iconCObject = { file = fileadmin/templates/images/icons/mail.gif } } } But I still see the original typo3 icons, the file exists and in the directory in the file property, but I still see the old icons. If I change it to: plugin.tt_news { newsFiles { stdWrap.wrap = <dd>Test|</dd iconCObject = IMAGE iconCObject = { file = fileadmin/templates/images/icons/mail.gif } } } I see the word test before each icon, so I know it has had an effect on the rendering of the file links in the article. So Whyy doesn't the icon change? ----- -- Stephen Bungert -- View this message in context: http://www.nabble.com/Changing-appearance-of-tt_news-file-list-icons-tp17865196p17866804.html Sent from the TYPO3 English mailing list archive at Nabble.com. _______________________________________________ TYPO3-english mailing list TYPO3-english@... http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english --
Stephen Bungert |
|
|
Re: Changing appearance of tt_news file list iconsOn Mon, Jun 16, 2008 at 5:19 PM, StephenBungert <stephenbungert@...> wrote:
> > > > Christopher Torgalson wrote: >> >> >> Your TS makes no sense :) >> >> The IMG_RESOURCE ***cObject*** and the imgResource ***function*** or >> ***data type*** are not the same thing. See the TSref for more >> details, but this should work: >> >> iconCObject.5 = IMAGE >> iconCObject.5 = { >> file = fileadmin/templates/images/icons/pdf.png >> } >> > > I thought not :-) > > I tried your code: > > plugin.tt_news { > newsFiles { > iconCObject = IMAGE > iconCObject = { > file = fileadmin/templates/images/icons/mail.gif > } > } > } > > But I still see the original typo3 icons, the file exists and in the > directory in the file property, but I still see the old icons. > > If I change it to: > > plugin.tt_news { > newsFiles { > stdWrap.wrap = <dd>Test|</dd > iconCObject = IMAGE > iconCObject = { > file = fileadmin/templates/images/icons/mail.gif > } > } > } > > I see the word test before each icon, so I know it has had an effect on the > rendering of the file links in the article. So Whyy doesn't the icon change? Well, you copied my typo, isn't it obvious? ;-p This may work better: plugin.tt_news { newsFiles { iconCObject = IMAGE iconCObject { file = fileadmin/templates/images/icons/mail.gif } } } -- Christopher Torgalson http://www.typo3apprentice.com/ _______________________________________________ TYPO3-english mailing list TYPO3-english@... http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english |
|
|
Re: Changing appearance of tt_news file list iconsStill didn't work :-( Here's all the code for tt_news, in case I did anything wrong. I don't understand why it doesn't change the icon. plugin.tt_news { newsFiles { iconCObject = IMAGE iconCObject { file = fileadmin/templates/images/icons/mail.gif } } # Change some strings to suit the site design _LOCAL_LANG.default.preAuthor = _LOCAL_LANG.default.more = Read more _LOCAL_LANG.default.backToList = Back to %s _LOCAL_LANG.default.noResultsMsg = No matching articles found. _LOCAL_LANG.default.searchEmptyMsg = Please enter a search word. _LOCAL_LANG.default.noNewsIdMsg = Can't display article<br />No Article ID could be found. _LOCAL_LANG.default.pi_list_browseresults_prev = Previous _LOCAL_LANG.default.pi_list_browseresults_page = Page _LOCAL_LANG.default.pi_list_browseresults_next = Next _LOCAL_LANG.default.pi_list_browseresults_first = First _LOCAL_LANG.default.pi_list_browseresults_last = Last _LOCAL_LANG.default.pi_list_browseresults_to = to # Template file templateFile = fileadmin/templates/fmf/extension_templates/tt_news_v2_template.html displaySingle { # Remove the P tag wrapped around the authors name author_stdWrap.wrap > # Stop Authors name being turned to upper case author_stdWrap.case > date_stdWrap.strftime = %d %B %Y #time_stdWrap.strftime = %H:%S imageCount = 1 } displayLatest { # Add an obfuscated mailto: link to authors name author_stdWrap.typolink.parameter.field = author_email date_stdWrap.strftime = %d %B %Y time_stdWrap.strftime = %H:%S } displayList { # Add an obfuscated mailto: link to authors name author_stdWrap.typolink.parameter.field = author_email date_stdWrap.strftime = %d %B %Y time_stdWrap.strftime = %H:%S content_stdWrap.stripHtml = 1 content_stdWrap.crop = 300 | ... | 1 image.params = style="float:left; margin-right:20px; margin-top:20px margin-bottom:0px" } #allowCaching = 0 searchPid = 20 limit = 6 noPageBrowser = 0 useMultiPageSingleView = 1 pageBreakToken = <---newpage---> pageBrowser.dontLinkActivePage = 1 pageBrowser.maxPages = 10 excludeAlreadyDisplayedNews = 1 substitutePagetitle = 1 } ----- -- Stephen Bungert -- View this message in context: http://www.nabble.com/Changing-appearance-of-tt_news-file-list-icons-tp17865196p17867016.html Sent from the TYPO3 English mailing list archive at Nabble.com. _______________________________________________ TYPO3-english mailing list TYPO3-english@... http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english --
Stephen Bungert |
|
|
Re: Changing appearance of tt_news file list iconsStill didn't work :-(
Here's all the code for tt_news, in case I did anything wrong. I don't understand why it doesn't change the icon. plugin.tt_news { newsFiles { iconCObject = IMAGE iconCObject { file = fileadmin/templates/images/icons/mail.gif } } # Change some strings to suit the site design _LOCAL_LANG.default.preAuthor = _LOCAL_LANG.default.more = Read more _LOCAL_LANG.default.backToList = Back to %s _LOCAL_LANG.default.noResultsMsg = No matching articles found. _LOCAL_LANG.default.searchEmptyMsg = Please enter a search word. _LOCAL_LANG.default.noNewsIdMsg = Can't display article<br />No Article ID could be found. _LOCAL_LANG.default.pi_list_browseresults_prev = Previous _LOCAL_LANG.default.pi_list_browseresults_page = Page _LOCAL_LANG.default.pi_list_browseresults_next = Next _LOCAL_LANG.default.pi_list_browseresults_first = First _LOCAL_LANG.default.pi_list_browseresults_last = Last _LOCAL_LANG.default.pi_list_browseresults_to = to # Template file templateFile = fileadmin/templates/fmf/extension_templates/tt_news_v2_template.html displaySingle { # Remove the P tag wrapped around the authors name author_stdWrap.wrap > # Stop Authors name being turned to upper case author_stdWrap.case > date_stdWrap.strftime = %d %B %Y #time_stdWrap.strftime = %H:%S imageCount = 1 } displayLatest { # Add an obfuscated mailto: link to authors name author_stdWrap.typolink.parameter.field = author_email date_stdWrap.strftime = %d %B %Y time_stdWrap.strftime = %H:%S } displayList { # Add an obfuscated mailto: link to authors name author_stdWrap.typolink.parameter.field = author_email date_stdWrap.strftime = %d %B %Y time_stdWrap.strftime = %H:%S content_stdWrap.stripHtml = 1 content_stdWrap.crop = 300 | ... | 1 image.params = style="float:left; margin-right:20px; margin-top:20px margin-bottom:0px" } #allowCaching = 0 searchPid = 20 limit = 6 noPageBrowser = 0 useMultiPageSingleView = 1 pageBreakToken = <---newpage---> pageBrowser.dontLinkActivePage = 1 pageBrowser.maxPages = 10 excludeAlreadyDisplayedNews = 1 substitutePagetitle = 1 } --
Stephen Bungert |
|
|
Re: Changing appearance of tt_news file list iconsI have it working now!
newsFiles { icon_image_ext_list = jpg,xls iconCObject = IMAGE iconCObject { file = fileadmin/templates/fmf/images/icons/mail.gif } icon_image_ext_list seems to be required, the description for it says: 'This is the extensions that should render as thumbsnails instead of icons.' so I thought it meant if I want to see a thumbnail (like in windows explorer) of a file use this, else show the icon in the iconCObject.file property. I wanted icons, so I didn't use this property - I didn't associate my gifs being classed differently from the default ones, which seem to be called icons, mine are just thumbnails it seems!. But when I add it and give it a comma seperated list of filetypes, any of those file types that show in the file list get the mail.gif file as an icon, instead of the default. I guess the decription needs re-wording to: 'These are the file extensions that should be rendered with the image specified by the iconCObject.file property instead of the default filetype images.' --
Stephen Bungert |
|
|
Re: Changing appearance of tt_news file list iconsI have it working now! newsFiles { icon_image_ext_list = jpg,xls iconCObject = IMAGE iconCObject { file = fileadmin/templates/fmf/images/icons/mail.gif } icon_image_ext_list seems to be required, the description for it says: 'This is the extensions that should render as thumbsnails instead of icons.' so I thought it meant if I want to see a thumbnail (like in windows explorer) of a file use this, else show the icon in the iconCObject.file property. I wanted icons, so I didn't use this property - I didn't associate my gifs being classed differently from the default ones, which seem to be called icons, mine are just thumbnails it seems!. But when I add it and give it a comma seperated list of filetypes, any of those file types that show in the file list get the mail.gif file as an icon, instead of the default. I guess the decription needs re-wording to: 'These are the file extensions that should be rendered with the image specified by the iconCObject.file property instead of the default filetype images.' ----- -- Stephen Bungert -- View this message in context: http://www.nabble.com/Changing-appearance-of-tt_news-file-list-icons-tp17865196p17867740.html Sent from the TYPO3 English mailing list archive at Nabble.com. _______________________________________________ TYPO3-english mailing list TYPO3-english@... http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english --
Stephen Bungert |
|
|
Re: Changing appearance of tt_news file list iconsAll I need to do now is get it to change the icon based on the type of file... hmmm
I wonder how I can do that? Why can't you just set a global setting for a path to a folder with icons in? It would be so much easier! --
Stephen Bungert |
|
|
Re: Changing appearance of tt_news file list iconsAll I need to do now is get it to change the icon based on the type of file... hmmm I wonder how I can do that? Why can't you just set a global setting for a path to a folder with icons in? It would be so much easier! ----- -- Stephen Bungert -- View this message in context: http://www.nabble.com/Changing-appearance-of-tt_news-file-list-icons-tp17865196p17867789.html Sent from the TYPO3 English mailing list archive at Nabble.com. _______________________________________________ TYPO3-english mailing list TYPO3-english@... http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english --
Stephen Bungert |
|
|
Re: Changing appearance of tt_news file list iconsHi,
On Mon, Jun 16, 2008 at 6:07 PM, StephenBungert <stephenbungert@...> wrote: > > All I need to do now is get it to change the icon based on the type of > file... hmmm > > I wonder how I can do that? Why can't you just set a global setting for a > path to a folder with icons in? It would be so much easier! If you look at the default TS setting in tt_news, that's how it works. Comment out your additions and just change the value of the path property from "uploads/media/" to "fileadmin/templates/fmf/images/icons/". Presumably your files will need the same names as those in the original icon directory. -- Christopher Torgalson http://www.typo3apprentice.com/ _______________________________________________ TYPO3-english mailing list TYPO3-english@... http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english |
|
|
|
|
|
Re: Changing appearance of tt_news file list iconsIs that not the path of the actual files? When you look at the path to the files they begin with that, but the src for the icons comes from a different folder, somewhere in the tslib or t3lib folders. I shall try what you say and see.
--
Stephen Bungert |
|
|
Re: Changing appearance of tt_news file list iconsIs that not the path of the actual files? When you look at the path to the files they begin with that, but the src for the icons comes from a different folder, somewhere in the tslib or t3lib folders. I shall try what you say and see. Christopher Torgalson wrote: > > If you look at the default TS setting in tt_news, that's how it works. > Comment out your additions and just change the value of the path > property from "uploads/media/" to > "fileadmin/templates/fmf/images/icons/". Presumably your files will > need the same names as those in the original icon directory. > > > -- > Christopher Torgalson > > ----- -- Stephen Bungert -- View this message in context: http://www.nabble.com/Changing-appearance-of-tt_news-file-list-icons-tp17865196p17880233.html Sent from the TYPO3 English mailing list archive at Nabble.com. _______________________________________________ TYPO3-english mailing list TYPO3-english@... http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english --
Stephen Bungert |
|
|
Re: Changing appearance of tt_news file list iconsThat didn't work, the path is a property of filelink, and this is the path to the file. Well, I managed to change the icon to a custom one for every download, I shall now look at changing the icon path , maybe using stdwrap.parseFunc ----- -- Stephen Bungert -- View this message in context: http://www.nabble.com/Changing-appearance-of-tt_news-file-list-icons-tp17865196p17881103.html Sent from the TYPO3 English mailing list archive at Nabble.com. _______________________________________________ TYPO3-english mailing list TYPO3-english@... http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english --
Stephen Bungert |
|
|
Re: Changing appearance of tt_news file list iconsThat didn't work, the path is a property of filelink, and this is the path to the file.
Well, I managed to change the icon to a custom one for every download, I shall now look at changing the icon path , maybe using stdwrap.parseFunc --
Stephen Bungert |
|
|
Re: Changing appearance of tt_news file list iconsHi all.
Incase anyone wants to do the same, I have now managed to change the file icons like this: ## Crop tag until the last slash in the src attribute - this leaves the filetype still (important) plugin.tt_news.newsFiles.stdWrap.substring = 49 # Then re-wrap the cropped tag with a path to the icon plugin.tt_news.newsFiles.stdWrap.innerWrap = <img src="fileadmin/templates/fmf/images/icons/fileicons/ | Send it through the HTML parser to alter other attributes, like for example, width and height. plugin.tt_news.newsFiles.stdWrap.HTMLparser = 1 plugin.tt_news.newsFiles.stdWrap.HTMLparser.tags.img.fixAttrib.width.set = 12 plugin.tt_news.newsFiles.stdWrap.HTMLparser.tags.img.fixAttrib.height.set = 12 The fileicons/ folder is a copy of that found here: typo3\sysext\cms\tslib\media\fileicons This is where the original icons were. I reference the same icons in my new folder: fileadmin/templates/fmf/images/icons/fileicons/ Which I can now edit to suit the sites design. --
Stephen Bungert |
|
|
Re: Changing appearance of tt_news file list iconsHi all. Incase anyone wants to do the same, I have now managed to change the file icons like this: ## Crop tag until the last slash in the src attribute - this leaves the filetype still (important) plugin.tt_news.newsFiles.stdWrap.substring = 49 # Then re-wrap the cropped tag with a path to the icon plugin.tt_news.newsFiles.stdWrap.innerWrap = <img src="fileadmin/templates/fmf/images/icons/fileicons/ | Send it through the HTML parser to alter other attributes, like for example, width and height. plugin.tt_news.newsFiles.stdWrap.HTMLparser = 1 plugin.tt_news.newsFiles.stdWrap.HTMLparser.tags.img.fixAttrib.width.set = 12 plugin.tt_news.newsFiles.stdWrap.HTMLparser.tags.img.fixAttrib.height.set = 12 The fileicons/ folder is a copy of that found here: typo3\sysext\cms\tslib\media\fileicons This is where the original icons were. I reference the same icons in my new folder: fileadmin/templates/fmf/images/icons/fileicons/ Which I can now edit to suit the sites design. ----- -- Stephen Bungert -- View this message in context: http://www.nabble.com/Changing-appearance-of-tt_news-file-list-icons-tp17865196p17882296.html Sent from the TYPO3 English mailing list archive at Nabble.com. _______________________________________________ TYPO3-english mailing list TYPO3-english@... http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english --
Stephen Bungert |
| Free embeddable forum powered by Nabble | Forum Help |