Index: openacs-4/packages/news/news.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/news.info,v diff -u -N -r1.18.2.3 -r1.18.2.4 --- openacs-4/packages/news/news.info 6 Sep 2005 06:11:33 -0000 1.18.2.3 +++ openacs-4/packages/news/news.info 26 Sep 2005 09:08:48 -0000 1.18.2.4 @@ -26,6 +26,7 @@ + Index: openacs-4/packages/news/catalog/news.en_AU.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/catalog/news.en_AU.ISO-8859-1.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/news/catalog/news.en_AU.ISO-8859-1.xml 26 Sep 2005 09:08:49 -0000 1.1.4.2 @@ -0,0 +1,121 @@ + + + + active + Active Revision + Add a new revision + Administer + Administration + All + approve + Approve item(s) + Approved + Archive Date + Archive Now + Archived + Author + Back to news list + Body + bytes + Comments + Confirm + Confirm Action: + Contributed by + Create a news item + Create News Item + Creation Date + Creation IP + Database Error + Delete + Error + Go + Going live in %n_days_until_publish% days, not scheduled for archive + Going live in %n_days_until_publish% days, scheduled for archive in %n_days_until_archive% days + HTML + It will go live on + It will move into the archive on + Log Entry + . +When you're done click 'Preview' to see how the news item will appear. + And be live until revoked. + Archive as of Next Month + Archive as of Next Week + cannot be applied to the following item(s): + Can't upload a publication in the text-field and a non-empty file. + Click on item ID# to approve/revoke an item. + Click on "revise" to edit an item. + Could not find corresponding revision to requested news item + Could not find the requested news item + Do the following to the selected items: + Do you really want to perform this action: + has been submitted and will go live as soon as it is approved. + It will go live after it is approved by the News Administrator. + Manage the items individually for approval first. + on + the following news item(s)? + One Item - add revision + Please check the items which you want to process. + Please supply the body of the news item. + Please supply the title of the news item. + Publish body is missing. Either upload file or enter something in the textarea. + red fields are required + See details for the error message below + Select the publication date and archive date: + The archive date must be AFTER the release date. + The database did not accept your input. + There are no items available. + There are no news items available. + To the readers it will look like: + Use the following form to define your news item. +Note that the + . +When you're done click 'Preview' to see how the news item will look. + You must supply a revision log information. + Your document is larger than the maximum size allowed + Your news item will be presented using the Default template defined in news.adp. + make active + Make Permanent + manage + never + News + News Archive + News Item + News item submitted + News Items + next + One Item + One Revision + or upload text file: + Plain Text + prev + Preview + Preview news item + Publication Date + Publish + Published + Published, not scheduled for archive + Published, archived in %n_days_until_archive% days + Release + Release Date + rev. + revise + Revision + Revision log + Revision Number + revoke + Scheduling Error + Search + Select + Show archived news + (show it permanently) + Show live news + Status + Submit a news item + Thank You! + The action + The text is formatted as + Title + Unapproved + Yes + Your news item + Index: openacs-4/packages/news/catalog/news.es_CO.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/catalog/news.es_CO.ISO-8859-1.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/news/catalog/news.es_CO.ISO-8859-1.xml 26 Sep 2005 09:08:49 -0000 1.1.4.2 @@ -0,0 +1,117 @@ + + + + activo + Revisi�n actual + A�adir una revisi�n nueva + Administrar + Administraci�n + Todo + aprobar + Aprobar elemento(s) + Aprobado + Fecha de Archivo + Archivar ahora + Archivado + Autor + Volver a la lista de noticias + Cuerpo + bytes + Comentarios + Confirmar + Confirmar la Acci�n: + Enviado por + Crear una nueva noticia + Crear nuevas noticias + Fecha de creaci�n + IP de creaci�n + Error en la base de datos + Borrar + Error + Ir + Ser� publicada en %n_days_until_publish% d�as, no est� programada para archivarse + Ser� publicada en %n_days_until_publish% d�as, programada para archivarse en %n_days_until_archive% d�as + HTML + Saldr� publicado en + Se mover� al archivo en + Entrada de Registro + . Una vez terminado, pulse 'Vista previa' para ver como aparecer�n las noticias. + Y estar� hasta que se revoque + Archivar como del mes siguiente + Archivar como de la pr�xima semana + no se pude aplicar a los siguientes elemento(s): + No se pude subir la publicaci�n en el fichero de texto o en el fichero vac�o. + Pulse el identificador del elemento para aprobar/revocar un elemento. + Pulse en "revisar" para editar un elemento. + No se pudo encontrar la revisi�n correspondiente al elemento de noticias solicitado + Elemento de noticias no encontrado + Haga lo siguiente a los elementos seleccionados: + Desea realmente realizar esta acci�n: + ha sido enviado y ser� publicado en cuanto reciba aprobaci�n. + Ser� publicado en cuanto reciba la aprobaci�n del administrador de noticias. + Administre los elementos individualmente para su aprobaci�n. + �sobre los elemento(s) de noticia siguientes? + Un elemento - a�adir revisi�n + Por favor, seleccione los elementos que desea procesar. + Por favor, introduzca el cuerpo de la noticia. + Por favor, introduzca el t�tulo de la noticia. + Falta el cuerpo de la noticia a publicar. Puede subir un archivo que lo contenga o introducirlo en la caja de texto. + los campos en rojo son obligatorios + Ver detalles del mensaje de error a continuaci�n + Seleccione la fecha de publicaci�n y de archivado: + La fecha de archivado debe ser POSTERIOR a la fecha de publicaci�n. + La base de datos rechaz� los datos. + No hay elementos disponibles. + No hay noticias disponibles. + Los lectores lo ver�n as�: + Utilice el formulario para definir su noticia. Observe que + . Una vez terminado, pulse 'Vista previa' para ver como se ver�n las noticias. + Debe suministrar la informaci�n sobre la revisi�n. + Su documento supera el tama�o m�ximo permitido + Su noticia ser� presentada con la plantilla por defecto definida en news.adp. + activar + Hacer Permanente + administrar + nunca + Noticias + Archivo de noticias + Noticia + Noticia enviada + Noticias + siguiente + Un Elemento + Una revisi�n + o suba un archivo de texto: + Texto + anterior + Vista previa + Vista previa de la noticia + Fecha de Publicaci�n + Publicar + Publicado + Publicada, no programada para archivarse + Publicada, se archivar� en %n_days_until_archive% d�as + Publicar + Fecha de publicaci�n + rev. + revisi�n + Revisi�n + Archivo de revisiones + N�mero de revisi�n + revocar + Error de planificaci�n + Buscar + Seleccionar + Mostrar noticias archivadas + (mostrar permanentemente) + Mostrar noticias actuales + Estado + Enviar una noticia + �Gracias! + La acci�n + El formato del texto es + T�tulo + No aprobado + S� + Su noticia + Index: openacs-4/packages/news/catalog/news.ms_my.utf-8.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/catalog/Attic/news.ms_my.utf-8.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/news/catalog/news.ms_my.utf-8.xml 26 Sep 2005 09:08:49 -0000 1.5.2.2 @@ -0,0 +1,117 @@ + + + + aktif + Penyemakan Aktif + Tambah penyemakan baru + Tadbir + Penyeliaan + Semua + lulus + Lulus butiran-butiran + Dilulus + Tarikh Arkib + Arkibkan Sekarang + Diarkib + Pengarang + Kembali kepada senarai berita + Badan + baits + Komen + Sah + Sahkan Aksi: + Dihasilkan oleh + Hasilkan satu butiran berita + Hasilkan Butiran Berita + Tarikh Penghasilan + IP Penghasilan + Ralat Pangkalan Data + Buang + Ralat + Teruskan + Diteruskan secara langsung dalam %n_days_until_publish%hari, tidak dijadualkan untuk diarkib + Diteruskan secara langsung dalam %n_days_until_publish%hari, dijadualkan untuk diarkib dalam %n_days_until_archive% hari + HTML + Ia akan disiarkan secara langsung pada + Ia akan dipindahkan ke arkib pada + Log Kemasukan + . Setelah anda siap klik 'Prebiu' untuk melihat bagaimana butiran berita akan kelihatan. + Dan hidup hingga diambil balik. + Arkib setakat Bulan Depan + Arkib setakat Minggu Depan + tidak boleh diaplikasikan kepada butiran-butiran tersebut: + Tidak boleh memuat naik terbitan di dalam ruangan teks dan fail bukan kosong. + Klik pada butiran ID# untuk luluskan/ambil balik sesuatu butiran. + Klik pada "baiki" untuk mengedit sesuatu butiran. + Tidak dapat menjumpai penyemakan sepadan dengan butiran berita yang diminta + Tidak dapat menjumpai butiran berita yand dipohon + Laksanakan yang berikut kepada butiran-butiran yang dipilih: + Adakah anda pasti ingin melaksanakan aksi ini: + telah dihantar dan akan disiarkan secara langsung secepat mungkin ia diluluskan. + Ia akan disiarkan secara langsung setelah ia diluluskan oleh Penyelia Berita. + Uruskan butiran-butiran secara individu untuk penglulusan dahulu. + terhadap butiran-butiran berita berikut? + Satu Butiran - tambah penyemakan + Sila semak butiran-butiran yang anda ingin memproseskan. + Sila sediakan badan butiran berita. + Sila sediakan tajuk butiran berita. + Tiada badan terbitan. Sama ada muat naikkan fail atau masukkan sesuatu di ruangan abjad. + medan-medan bewarna merah diperlukan + Rujuk kepada keterangan lanjut untuk mesej ralat di bawah + Pilih tarikh terbitan dan tarikh arkib: + Tarikh arkib mestilah SELEPAS tarikh pengeluaran. + Pangkalan data tidak menerima input anda. + Tiada butiran-butiran yang tersedia. + Tiada butiran-butiran berita yang tersedia. + Kepada pembaca ia akan kelihatan seperti: + Gunakan borang tersebut untuk menghuraikan butiran berita anda. Ambil perhatian bahawa + . Setelah anda siap klik 'Prebiu' untuk melihat bagaimana butiran berita akan kelihatan. + Anda mesti memberi informasi log penyemakan. + Dokumen anda adalah lebih besar daripada saiz maksimum yang dibenarkan + Butiran berita anda akan dipaparkan dengan menggunakan Default template yang ditetapkan di news.adp. + aktifkan + Tetapkan + urus + tidak pernah + Berita + Arkib Berita + Butiran Berita + Butiran berita dihantar + Butiran-butiran Berita + berikut + Satu Butiran + Satu Penyemakan + atau muat naik fail teks: + Abjad Biasa + prebiu + Prebiu + Prebiu butiran berita + Tarikh Terbitan + Terbit + Diterbitkan + Diterbitkan, tidak dijadualkan untuk diarkib + Diterbitkan, akan diarkib dalam %n_days_until_archive% hari + Keluaran + Tarikh Keluaran + penyemakan + penyemakan + Penyemakan + Log penyemakan + Nombor Penyemakan + ambil balik + Ralat Jadual + Cari + Pilih + Tunjukkan berita-berita yang diarkibkan + (tunjukkannya secara tetap) + Tunjukkan berita secara langsung + Status + Hantar butiran berita + Terima Kasih! + Aksi + Abjad telah diformatkan sebagai + Tajuk + Tidak diluluskan + Ya + Butiran berita anda + Index: openacs-4/packages/news/sql/oracle/upgrade/upgrade-5.0d1-5.0d2.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/sql/oracle/upgrade/upgrade-5.0d1-5.0d2.sql,v diff -u -N -r1.1 -r1.1.8.1 --- openacs-4/packages/news/sql/oracle/upgrade/upgrade-5.0d1-5.0d2.sql 8 Oct 2003 16:59:23 -0000 1.1 +++ openacs-4/packages/news/sql/oracle/upgrade/upgrade-5.0d1-5.0d2.sql 26 Sep 2005 09:08:49 -0000 1.1.8.1 @@ -67,7 +67,8 @@ function status ( - news_id in cr_news.news_id%TYPE + publish_date in cr_revisions.publish_date%TYPE, + archive_date in cr_news.archive_date%TYPE ) return varchar2; @@ -359,42 +360,27 @@ -- the status function returns information on the puplish or archive status -- it does not make any checks on the order of publish_date and archive_date function status ( - news_id in cr_news.news_id%TYPE + publish_date in cr_revisions.publish_date%TYPE, + archive_date in cr_news.archive_date%TYPE ) return varchar2 is - v_archive_date date; - v_publish_date date; begin - -- populate variables - select archive_date into v_archive_date - from cr_news - where news_id = news.status.news_id; - -- - select publish_date into v_publish_date - from cr_revisions - where revision_id = news.status.news_id; - - -- if publish_date is not null the item is approved, otherwise it is not - if v_publish_date is not null then - if v_publish_date > sysdate then + + if publish_date is not null then + if publish_date > sysdate then -- to be published (2 cases) - -- archive date could be null if it has not been decided when to archive - if v_archive_date is null then - return 'going live in ' || - round(to_char(v_publish_date - sysdate),1) || ' days'; + if archive_date is null then + return 'going_live_no_archive'; else - return 'going live in ' || - round(to_char(v_publish_date - sysdate),1) || ' days' || - ', archived in ' || round(to_char(v_archive_date - sysdate),1) || ' days'; + return 'going_live_with_archive'; end if; else -- already released or even archived (3 cases) - if v_archive_date is null then - return 'published, not scheduled for archive'; + if archive_date is null then + return 'published_no_archive'; else - if v_archive_date - sysdate > 0 then - return 'published, archived in ' || - round(to_char(v_archive_date - sysdate),1) || ' days'; + if archive_date - sysdate > 0 then + return 'published_with_archive'; else return 'archived'; end if; @@ -583,6 +569,3 @@ end news; / show errors - - - Index: openacs-4/packages/news/sql/postgresql/news-sc-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/sql/postgresql/news-sc-create.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/news/sql/postgresql/news-sc-create.sql 26 Sep 2005 09:08:49 -0000 1.2.2.2 @@ -0,0 +1,30 @@ +-- /packages/news/sql/news-sc-create.sql +-- +-- @author Robert Locke (rlocke@infiniteinfo.com) +-- @created 2001-10-23 +-- @cvs-id $Id: news-sc-create.sql,v 1.2.2.2 2005/09/26 09:08:49 victorg Exp $ +-- +-- Adds search support to news module. +-- + +select acs_sc_impl__new( + 'FtsContentProvider', -- impl_contract_name + 'news', -- impl_name + 'news' -- impl_owner_name +); + +select acs_sc_impl_alias__new( + 'FtsContentProvider', -- impl_contract_name + 'news', -- impl_name + 'datasource', -- impl_operation_name + 'news__datasource', -- impl_alias + 'TCL' -- impl_pl +); + +select acs_sc_impl_alias__new( + 'FtsContentProvider', -- impl_contract_name + 'news', -- impl_name + 'url', -- impl_operation_name + 'news__url', -- impl_alias + 'TCL' -- impl_pl +); Index: openacs-4/packages/news/sql/postgresql/news-sc-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/sql/postgresql/news-sc-drop.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/news/sql/postgresql/news-sc-drop.sql 26 Sep 2005 09:08:49 -0000 1.2.2.2 @@ -0,0 +1,13 @@ +-- /packages/news/sql/news-sc-drop.sql +-- +-- @author Robert Locke (rlocke@infiniteinfo.com) +-- @created 2001-10-23 +-- @cvs-id $Id: news-sc-drop.sql,v 1.2.2.2 2005/09/26 09:08:49 victorg Exp $ +-- +-- Removes search support from news module. +-- + +select acs_sc_impl__delete( + 'FtsContentProvider', -- impl_contract_name + 'news' -- impl_name +); Index: openacs-4/packages/news/tcl/news-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/tcl/news-procs.tcl,v diff -u -N -r1.20.2.4 -r1.20.2.5 --- openacs-4/packages/news/tcl/news-procs.tcl 6 Sep 2005 06:11:34 -0000 1.20.2.4 +++ openacs-4/packages/news/tcl/news-procs.tcl 26 Sep 2005 09:08:49 -0000 1.20.2.5 @@ -401,4 +401,4 @@ -notif_subject "Latest News" \ -notif_text $new_content -} \ No newline at end of file +} Index: openacs-4/packages/news/tcl/news-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/tcl/news-procs.xql,v diff -u -N -r1.8.2.2 -r1.8.2.3 --- openacs-4/packages/news/tcl/news-procs.xql 19 Jul 2005 22:01:28 -0000 1.8.2.2 +++ openacs-4/packages/news/tcl/news-procs.xql 26 Sep 2005 09:08:49 -0000 1.8.2.3 @@ -20,10 +20,12 @@ - -SELECT live_revision AS image_id -FROM cr_items -WHERE content_type = 'image' AND parent_id = :item_id - + + + SELECT live_revision AS image_id + FROM cr_items + WHERE content_type = 'image' AND parent_id = :item_id + + Index: openacs-4/packages/news/www/item-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/Attic/item-oracle.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/news/www/item-oracle.xql 26 Sep 2005 09:08:49 -0000 1.5.2.2 @@ -0,0 +1,28 @@ + + + oracle8.1.6 + + + + +select item_id, + live_revision, + publish_title, + html_p, + publish_date, + '' || item_creator || '' as creator_link +from news_items_live_or_submitted +where item_id = :item_id + + + + + + + select content + from cr_revisions + where revision_id = :live_revision + + + + Index: openacs-4/packages/news/www/item-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/Attic/item-postgresql.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/news/www/item-postgresql.xql 26 Sep 2005 09:08:49 -0000 1.4.2.2 @@ -0,0 +1,20 @@ + + + postgresql7.1 + + + + +select item_id, + live_revision, + publish_title, + html_p, + publish_date, + publish_body, + '' || item_creator || '' as creator_link +from news_items_live_or_submitted +where item_id = :item_id + + + + Index: openacs-4/packages/news/www/item.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/item.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/news/www/item.tcl 26 Sep 2005 09:08:49 -0000 1.13.2.2 @@ -0,0 +1,115 @@ +# /packages/news/www/item.tcl + +ad_page_contract { + + Page to view one item (live or archived) in its active revision + @author stefan@arsdigita.com + @creation-date 2000-12-20 + @cvs-id $Id: item.tcl,v 1.13.2.2 2005/09/26 09:08:49 victorg Exp $ + +} { + + item_id:integer,notnull + +} -properties { + title:onevalue + context:onevalue + item_exist_p:onevalue + publish_title:onevalue + publish_date:onevalue + publish_body:onevalue + html_p:onevalue + creator_link:onevalue + comments:onevalue + comment_link:onevalue +} + + +set user_id [ad_conn untrusted_user_id] + +permission::require_permission \ + -object_id $item_id \ + -party_id $user_id \ + -privilege read + + +# live view of a news item in its active revision +set item_exist_p [db_0or1row one_item " +select item_id, + live_revision, + publish_title, + html_p, + publish_date, + '' || item_creator || '' as creator_link +from news_items_live_or_submitted +where item_id = :item_id"] + + +if { $item_exist_p } { + + # workaround to get blobs with >4000 chars into a var, content.blob_to_string fails! + # when this'll work, you get publish_body by selecting 'publish_body' directly from above view + # + # RAL: publish_body is already snagged in the 1st query above for postgres. + # + set get_content [db_map get_content] + if {![string match "" $get_content]} { + set publish_body [db_string get_content "select content + from cr_revisions + where revision_id = :live_revision"] + } + + # text-only body + if {[info exists html_p] && [string equal $html_p "f"]} { + set publish_body [ad_text_to_html -- $publish_body] + } + + if { [ad_parameter SolicitCommentsP "news" 0] && + [ad_permission_p $item_id general_comments_create] } { + set comment_link [general_comments_create_link $item_id "[ad_conn package_url]item?item_id=$item_id"] + set comments [general_comments_get_comments -print_content_p 1 -print_attachments_p 1 \ + $item_id "[ad_conn package_url]item?item_id=$item_id"] + } else { + set comment_link "" + set comments "" + } + + if {[permission::permission_p -object_id $item_id -privilege write] } { + set edit_link "Revise" + } else { + set edit_link "" + } + + + set title $publish_title + set context [list $title] + set publish_title {} + +} else { + set context {} + set title "[_ news.Error]" +} + + + + + + + + + + + + + + + + + + + + + + + +