SimpleList parentList = HTMLTemplateProcessor.makeSimpleList(theParentList);
// get the newswire
- whereClause="is_published=true AND to_article_type >= 1";
+ whereClause="is_published=true AND to_article_type = 1";
entityList = contentModule.getContent(whereClause,"date desc, webdb_create desc",0,newsPerPage);
SimpleList newsWireList = HTMLTemplateProcessor.makeSimpleList(entityList);
for (int i=0; i < entityList.size();i++) {
theLog.printError("ProducerStartpage:problem in reflection: "+mediaHandlerName);
}
- //the best media type
+ //the "best" media type to show
if (mediaHandler.isVideo()) {
tinyIcon = MirConfig.getProp("Producer.Icon.TinyVideo");
iconAlt = "Video";
SimpleList startItemList = HTMLTemplateProcessor.makeSimpleList(entityList);
for (int k=0; k < entityList.size();k++) {
currentContent = (EntityContent)entityList.elementAt(k);
- //images to content
+ //media to content
currentMediaList = DatabaseContentToMedia.getInstance().getUploadedMedia(currentContent);
if (currentMediaList!=null && currentMediaList.getCount()>=1) {
SimpleList mediaListAudio = new SimpleList();
SimpleList mediaListImages = new SimpleList();
SimpleList mediaListVideo = new SimpleList();
SimpleList mediaListOther = new SimpleList();
- //SimpleHash allMediaSimpleHash = new SimpleHash();
for (int n=0; n < currentMediaList.size();n++) {
upMedia = currentMediaList.elementAt(n);
upMediaSimpleHash = HTMLTemplateProcessor.makeSimpleHash(upMedia);
} //end if media_type != null
} //end for
try{
- //SimpleList contentList = (SimpleList)mergeData.get("contentlist");
contentHash = (SimpleHash)startItemList.get(k);
contentHash.put("to_media_audio", mediaListAudio);
contentHash.put("to_media_images", mediaListImages);
} //end if currentMediaList != null
} //enf for featurueList.size..
-
-
- /*for (int i=0; i < entityList.size();i++) {
- currentContent = (EntityContent)entityList.elementAt(i);
- //fetching/setting the images
- imageEntityList = DatabaseContentToMedia.getInstance().getImages(currentContent);
- if (imageEntityList!=null && imageEntityList.getCount()>=1) {
- try{
- mediaList = HTMLTemplateProcessor.makeSimpleList(imageEntityList);
- contentHash = (SimpleHash)startItemList.get(i);
- contentHash.put("to_media", mediaList);
- } catch (Exception e){}
- }
- }*/
-
// get the breaking news
// only the first 5
// todo: the number of breaking_news items have to be configurable
SimpleList featureList = HTMLTemplateProcessor.makeSimpleList(entityList);
for (int k=0; k < entityList.size();k++) {
currentContent = (EntityContent)entityList.elementAt(k);
- //images to content
+ //media to content
currentMediaList = DatabaseContentToMedia.getInstance().getUploadedMedia(currentContent);
if (currentMediaList!=null && currentMediaList.getCount()>=1) {
SimpleList mediaListAudio = new SimpleList();
SimpleList mediaListImages = new SimpleList();
SimpleList mediaListVideo = new SimpleList();
SimpleList mediaListOther = new SimpleList();
- //SimpleHash allMediaSimpleHash = new SimpleHash();
for (int n=0; n < currentMediaList.size();n++) {
upMedia = currentMediaList.elementAt(n);
upMediaSimpleHash = HTMLTemplateProcessor.makeSimpleHash(upMedia);
} //end if media_type != null
} //end for
try{
- //SimpleList contentList = (SimpleList)mergeData.get("contentlist");
contentHash = (SimpleHash)featureList.get(k);
contentHash.put("to_media_audio", mediaListAudio);
contentHash.put("to_media_images", mediaListImages);
} //end if currentMediaList != null
} //enf for featurueList.size..
-
-
- /*for (int i=0; i < entityList.size();i++) {
- currentContent = (EntityContent)entityList.elementAt(i);
- //fetching/setting the images
- imageEntityList = DatabaseContentToMedia.getInstance().getImages(currentContent);
- if (imageEntityList!=null && imageEntityList.getCount()>=1) {
- try{
- mediaList = HTMLTemplateProcessor.makeSimpleList(imageEntityList);
- contentHash = (SimpleHash)featureList.get(i);
- contentHash.put("to_media", mediaList);
- } catch (Exception e){}
- }
- }*/
-
// Zusaetzlich Informationen
startPageModel = new SimpleHash();
startPageModel.put("breakingnews", breakingList);