News MOD

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
markoehl
Posts: 50
Joined: Thu 29. Dec 2005, 11:08
Location: Zürich
Contact:

News MOD

Post by markoehl »

News Mod V 2.0

Goal:
Add News (title, AND/OR Teaser, Content, Image) and publish them on specific parts on your site. For example public news, member news, media news, calendar, FAQ, news archiv etc. Set Links to internal or external content. You can use templates to create different views

Example: http://www.ausflugsgruppe-taka.ch/phpwcms
Download Script: http://www.alpine-davos.ch/phpwcms -> Login downloadsection (Version 17.10.06)

Feedbacks and bug reports welcome anytime!
Markus Köhl
Last edited by markoehl on Thu 19. Oct 2006, 11:05, edited 7 times in total.
User avatar
Fulvio Romanin
Posts: 394
Joined: Thu 4. Dec 2003, 11:12
Location: Udine, Italy
Contact:

Post by Fulvio Romanin »

looks nice; if i can just add my 5 cents, i'd make categorization as well....

like in wordpress, for example...
Completeness is reached through subtraction, not through addition
JensZ
Posts: 136
Joined: Wed 16. Feb 2005, 12:18
Location: Stockholm, Sweden
Contact:

Post by JensZ »

After a first look, this looks really promising. I had to make some changes to get it to work, as I already have modules with IDs 2 and 3. I also had to comment out the following:

Code: Select all

if (stristr($_SESSION["wcs_usr_access"], "news_rw_")) {
I suspect that is meant to prevent users without access from updating news, etc. I don't have the session variable in my version of phpwcms. How is it supposed to work?

//Jens
markoehl
Posts: 50
Joined: Thu 29. Dec 2005, 11:08
Location: Zürich
Contact:

Post by markoehl »

JensZ wrote: I suspect that is meant to prevent users without access from updating news, etc. I don't have the session variable in my version of phpwcms. How is it supposed to work?
I added a permissionpart into the usermanagement to give access to different MODs. You can delete this part, I have changed that in the zip file too. I'm thankful for any suggestions...
JensZ
Posts: 136
Joined: Wed 16. Feb 2005, 12:18
Location: Stockholm, Sweden
Contact:

Post by JensZ »

Ok,

Now I have played around with it some more and I like it a lot. I have looked for something like this. Some users need an easy way to quickly write some text without having to worry about fancy content types, etc, and this mod would be the perfect solution. Here are a few enhancement suggestions:

1. Permissions (since yours only took care of the whole mod itself). A particular user cannot edit articles in another user's news area. I.e. a user should only see the news categories/areas/contentparts which
he/she has been granted access for.

2. Templates to change the look of the article. I have started to work on this.

3. Not always have the image link to another article or external link. This was a little hard to grasp at first, I think. Maybe it could be made a little more straight forward that the link is for an article OR external link, depending on how it is set up. I like the idea to link to articles, though!

4. Set the size of the image.

5. Paging. Only show a number of articles.

What do you think?

FYI, I had to make some changes to get it to work. There were a few "bugs" (?) where you have left the cms/ in the path, which caused some images not to show. I also had to change the form name from "article" to "articlecontent" to get the filebrowser to work.

Cheers,

Jens
markoehl
Posts: 50
Joined: Thu 29. Dec 2005, 11:08
Location: Zürich
Contact:

Post by markoehl »

Fulvio Romanin wrote:i'd make categorization as well..
I included kategories, have to update the frontend newsarchiv to. Work on that. Thanx for the idea.
markoehl
Posts: 50
Joined: Thu 29. Dec 2005, 11:08
Location: Zürich
Contact:

Post by markoehl »

Thaaaaanx
JensZ wrote: 1. Permissions (since yours only took care of the whole mod itself). A particular user cannot edit articles in another user's news area. I.e. a user should only see the news categories/areas/contentparts which
he/she has been granted access for.
The whole permission stuff is not proper solved anyway. Same problem with Newsletter and all MODs. If Oliver ist nort faster I will reprogramm the whole Usersection ;-)
JensZ wrote:Templates to change the look of the article. I have started to work on this.
Let me know..
Not always have the image link to another article or external link. This was a little hard to grasp at first, I think. Maybe it could be made a little more straight forward that the link is for an article OR external link, depending on how it is set up. I like the idea to link to articles, though!
I will work on that
Set the size of the image.
I use the standart size form config.inc.php
Paging. Only show a number of articles.
Will impelent this too...

What do you think?
There were a few "bugs" (?) where you have left the cms/ in the path, which caused some images not to show. I also had to change the form name from "article" to "articlecontent" to get the filebrowser to work.
I will fix this bugs...
User avatar
Fulvio Romanin
Posts: 394
Joined: Thu 4. Dec 2003, 11:12
Location: Udine, Italy
Contact:

Post by Fulvio Romanin »

another suggestion which might scandalize a bit wcms purists - one should be able to add images for the article template from within the wysiwyg content part - 90% of my customers find the file manager too tricky... :roll:
Completeness is reached through subtraction, not through addition
netkiller
Posts: 26
Joined: Fri 7. Jan 2005, 10:43

Post by netkiller »

Also irgendetwas stimmt hier noch nicht :(
ich habe den mod installiert und mir werden unter module im adminbereich keine nav-buttons rechts angezeigt. bei der recherche ist mir aufgefallen das diese felder nichr richtig definiert wurden. so findet er unter "/include/inc_lang/backend/de" garnicht "be_subscribers_newkat" und so ist es bei allen 3 buttons.

was muss ich machen?

des weiter funktioniert der sql nicht richtig

`news_tstamp` timestamp NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,

erst wenn man den sql etwas änder geht es zu importieren.
ich hoffe es gibt nicht noch mehr fehler :shock:
es wäre schön, wenn mir jemand helfen könnte damit ich die buttons angezeigt bekomme.

danke
markoehl
Posts: 50
Joined: Thu 29. Dec 2005, 11:08
Location: Zürich
Contact:

Post by markoehl »

netkiller wrote:mir werden unter module im adminbereich keine nav-buttons rechts angezeigt. bei der recherche ist mir aufgefallen das diese felder nichr richtig definiert wurden. so findet er unter "/include/inc_lang/backend/de" garnicht "be_subscribers_newkat"
Füge im lang.inc.php

$BL['be_subnav_article_news_center'] = 'News';
$BL['be_subnav_article_news_new'] = 'News erfassen';
$BL['be_subnav_article__newkat'] = 'Kategorien';

hinzu und ersetze be_subscribers_newkat durch be_subnav_article__newkat. Habe das im zipfile upgedated

des weiter funktioniert der sql nicht richtig
Habe ich ergänzt
netkiller
Posts: 26
Joined: Fri 7. Jan 2005, 10:43

Post by netkiller »

Vielen Dank für deine schnelle info!

aber es passt immer noch nicht ganz.

1. sql fehler bei

`news_tstamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,

2. sql fehler bei

`subscription_name` text collate latin1_german1_ci NOT NULL,

3. Kategorien Button wird nicht angezeigt und wenn man ihn korrigiert kann man keine anlegen.

4. wenn ich einen News erfassen will habe ich nicht die Möglichkeit diesen zu speichern. Es wird nur der Button abbrechen angezeigt.

5. ich nehme mal an weil ich noch nicht die Möglichkeit habe eine Kategorie anzulegen kann ich diese auch noch nicht bei der Erstellung einer News nicht auswählen.

Bin ja mal gespannt ob du das Fixen kannst. Ich wäre dir jedenfals Dankbar.

Gruß
markoehl
Posts: 50
Joined: Thu 29. Dec 2005, 11:08
Location: Zürich
Contact:

Post by markoehl »

netkiller wrote:sql fehler bei
Habe den sql Code noch mal etwas angepasst, läuft bei mir mit phpmyadmin problemlos. Ansonsten bitte genauere Fehlermeldung...
netkiller wrote:Kategorien Button wird nicht angezeigt und wenn man ihn korrigiert kann man keine anlegen.
??
netkiller wrote:wenn ich einen News erfassen will habe ich nicht die Möglichkeit diesen zu speichern. Es wird nur der Button abbrechen angezeigt.
Habe ich behoben. Bitte das aktuellen zip File herunterldaen
netkiller wrote:ich nehme mal an weil ich noch nicht die Möglichkeit habe eine Kategorie anzulegen kann ich diese auch noch nicht bei der Erstellung einer News nicht auswählen.
Habe ich im Backend vorbereitet. Die frontentsuche werde ich noch anpasssen...

Check it out
Markus
netkiller
Posts: 26
Joined: Fri 7. Jan 2005, 10:43

Post by netkiller »

wow, nicht schlecht deine Antwortzeiten!!

Bei der Ausführung der SQL kommt folgender Fehler:

#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`news_hits` i


Habe soeben deine Anpassungen durchgeführt. jedoch kommt sobald ich den News speichere:

error while updating or inserting news: INSERT INTO phpwcms_news SET news_title='Es wurde soeben der erste Leserbrief veröffentlicht!', news_text='', news_datepublish='2006-01-29 00:00:00', news_linktext='', news_alink='', news_calink=47, cimage_name='', cimage_id='', news_cid='0', news_aid=',50,', article_begin='2006-01-29 00:00:00', set_begin=1, article_end='2006-02-12 00:00:00', set_end=1, news_type=1 ;

gleich noch eine frage kann ich auch einen News bearbeiten, sollte sich mal ein Fehler eingeschlichen haben.

THX
netkiller
Posts: 26
Joined: Fri 7. Jan 2005, 10:43

Post by netkiller »

wow, nicht schlecht deine Antwortzeiten!!

Bei der Ausführung der SQL kommt folgender Fehler:

#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`news_hits` i


Habe soeben deine Anpassungen durchgeführt. jedoch kommt sobald ich den News speichere:

error while updating or inserting news: INSERT INTO phpwcms_news SET news_title='Es wurde soeben der erste Leserbrief veröffentlicht!', news_text='', news_datepublish='2006-01-29 00:00:00', news_linktext='', news_alink='', news_calink=47, cimage_name='', cimage_id='', news_cid='0', news_aid=',50,', article_begin='2006-01-29 00:00:00', set_begin=1, article_end='2006-02-12 00:00:00', set_end=1, news_type=1 ;

gleich noch eine frage kann ich auch einen News bearbeiten, sollte sich mal ein Fehler eingeschlichen haben.

THX
markoehl
Posts: 50
Joined: Thu 29. Dec 2005, 11:08
Location: Zürich
Contact:

Post by markoehl »

netkiller wrote:#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`news_hits` i
Sehe da im Moment noch keine Lösung...
netkiller wrote:Habe soeben deine Anpassungen durchgeführt. jedoch kommt sobald ich den News speichere:
Habe das File news.editcontent.inc.php angepasst. sollte jetzt klappen
netkiller wrote:gleich noch eine frage kann ich auch einen News bearbeiten, sollte sich mal ein Fehler eingeschlichen haben.
Na klar kannst du das. Du kannst auch angeben welche News im Archiv erscheinen sollen
Post Reply