Skip to content

Commit

Permalink
* Unicode fixes
Browse files Browse the repository at this point in the history
* Removed global usage
  • Loading branch information
Chrissyx committed Dec 4, 2022
1 parent 345da09 commit ed69854
Show file tree
Hide file tree
Showing 9 changed files with 202 additions and 206 deletions.
56 changes: 28 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Chrissyx Homepage Scripts - Newsscript

[![version](https://img.shields.io/badge/version-1.0.7-blue)](https://www.chrissyx.com/scripts.php#Newsscript)
[![version](https://img.shields.io/badge/version-1.0.7.1-blue)](https://www.chrissyx.com/scripts.php#Newsscript)

## Introduction
File-based, fast, multilingual newsscript with BBCode, smilies, commenting, newsticker and dedicated admin panel incl. user, category, smiley administration and small statistic. Additional features are "Read on", list of references and newsticker supporting RSS feeds, internal listing and external embedding on other websites. Everything is configurable, starting with number of news per page, number of smilies (even for each row!) up to storage locations for the internal system files. Simple and easy installation with interactive help incl. translations for German and English. Continuous valid XHTML and due to caching really fast. Requires PHP 5.3 or higher and NO database.
Expand All @@ -13,60 +13,60 @@ File-based, fast, multilingual newsscript with BBCode, smilies, commenting, news
The installation is simple as usual: Upload in that directory, in which your website is (and you're planning to use the Newsscript), the `news.php` file and the folder `newsscript` including its contents. Point your browser to the `index.php` in the `newsscript` folder and follow the instructions. If you would like to use the news ticker as well, upload the `newsticker.php` to the same location you've uploaded the `news.php` before.

## Update to new version
Upload, just like the installation, all files by replacing every file with its newer version. Point your browser to the `update.php` in the `newsscript` folder and follow the instructions.
Upload, just like the installation, all files by replacing every file with its newer version. Point your browser to the `update.php` in the `newsscript` folder and follow the instructions.
***IMPORTANT:*** Delete the `update.php` after updating the script!

## FAQ
- How to manage my news script?
Just point your browser to the `index.php` file in the `newsscript` folder, as you did during the installation and follow the instructions.
Just point your browser to the `index.php` file in the `newsscript` folder, as you did during the installation and follow the instructions.

- I've forgot my password!
Go to the login form, you can request a new password there. The old one is still valid until you log in with the new password.
Go to the login form, you can request a new password there. The old one is still valid until you log in with the new password.

- How are these sources working?
Type in the link and add it. It's now saved and will disappear from the field. On the same way, you can remove the last added source with the link next to it. Click on "Preview" and then on the dropdown list with the arrow to check all available sources.
Type in the link and add it. It's now saved and will disappear from the field. On the same way, you can remove the last added source with the link next to it. Click on "Preview" and then on the dropdown list with the arrow to check all available sources.

- Is it possible to translate the news script to another language?
Of course, copy an INI file and name it to the official language code corresponding to the desired language. E.g. `fr.ini` for French or `nl.ini` for Dutch. Start translating the strings between the quotation marks and check the hints at the beginning of the file. By having a complete translation, upload it to the `newsscript` folder and choose it from the language menu in the administration. Also please send it to me for providing it for other user! :slightly_smiling_face:
Of course, copy an INI file and name it to the official language code corresponding to the desired language. E.g. `fr.ini` for French or `nl.ini` for Dutch. Start translating the strings between the quotation marks and check the hints at the beginning of the file. By having a complete translation, upload it to the `newsscript` folder and choose it from the language menu in the administration. Also please send it to me for providing it for other user! :slightly_smiling_face:

- What about the news ticker?
Just a quick overview for now: Use this code for internal listing of headlines on your homepage:
`<!-- CHS - Newsscript - Ticker --><?php include('newsticker.php'); ?><!-- /CHS - Newsscript - Ticker -->`
This example link will provide a RSS Newsfeed:
`http://www.mysite.tld/newsticker.php?type=rss`
This example code will provide the latest headlines for an external website:
`<script type="text/javascript" src="http://www.mysite.tld/newsticker.php?type=extern"></script>`
To change the number of displayed news apart from the setting you've entered during installation, add `&anz=X` to each link, e.g. 10 entries for the RSS Feed:
`http://www.mysite.tld/newsticker.php?type=rss&anz=10`
Or last 7 headlines for another website displaying your news:
`<script type="text/javascript" src="http://www.mysite.tld/newsticker.php?type=extern&anz=7"></script>`
You should provide your visitors these informations somewhere, thought.
Hope you got a clue about the features anyway. :wink:
Just a quick overview for now: Use this code for internal listing of headlines on your homepage:
`<!-- CHS - Newsscript - Ticker --><?php include('newsticker.php'); ?><!-- /CHS - Newsscript - Ticker -->`
This example link will provide a RSS Newsfeed:
`https://www.mysite.tld/newsticker.php?type=rss`
This example code will provide the latest headlines for an external website:
`<script type="text/javascript" src="https://www.mysite.tld/newsticker.php?type=extern"></script>`
To change the number of displayed news apart from the setting you've entered during installation, add `&anz=X` to each link, e.g. 10 entries for the RSS Feed:
`https://www.mysite.tld/newsticker.php?type=rss&anz=10`
Or last 7 headlines for another website displaying your news:
`<script type="text/javascript" src="https://www.mysite.tld/newsticker.php?type=extern&anz=7"></script>`
You should provide your visitors these informations somewhere, thought.
Hope you got a clue about the features anyway. :wink:

- I'm getting a message like "ERROR: Datei/Ordner nicht gefunden!"?!?
Read again the install instructions carefully! Keep in mind, that folderpaths always have to end with `/`.
Read again the install instructions carefully! Keep in mind, that folderpaths always have to end with `/`.

- I'm getting a message like "ERROR: Konnte keine Rechte setzen!"?!?
Set with your FTP program and chmod command the rights to `775` for the mentioned file/folder.
Set with your FTP program and chmod command the rights to `775` for the mentioned file/folder.

- I'm getting a "Warning: session_start(): Cannot send session cache limiter" warning?!?
Paste at the very beginning of your homepage (even before `<html>` or `<!DOCTYPE...`), on which you're running the news script, this code:
`<?php session_start(); ?>`
Paste at the very beginning of your homepage (even before `<html>` or `<!DOCTYPE...`), on which you're running the news script, this code:
`<?php session_start(); ?>`

- Is it possible to change the design of the news script?
The news script itself should already fit as far as possible to your own page design. If you would like to adjust more details of the news layout, you can use and fill out some predefined CSS classes, available since version 1.0.1:
The news script itself should already fit as far as possible to your own page design. If you would like to adjust more details of the news layout, you can use and fill out some predefined CSS classes, available since version 1.0.1:
* newsscriptmain: For all news entries incl. single news viewing
* newsscriptfooter: For the page navigation under the news listing
* newsscriptcomments: For the whole comments area

You can define those classes in the `<head>...</head>` section or include them in your own CSS file. For more information about CSS, see here: https://en.wikibooks.org/wiki/Cascading_Style_Sheets
You can define those classes in the `<head>...</head>` section or include them in your own CSS file. For more information about CSS, see here: https://en.wikibooks.org/wiki/Cascading_Style_Sheets

- I'm getting a message "Fatal error: Call to undefined function imagecreatetruecolor()" while uploading a pic?!?
Automatic scaling of a category image needs the GD library loaded as PHP extension. If you don't have any access to the php.ini file to activate it, you have to adjust the image size manually before uploading.
Automatic scaling of a category image needs the GD library loaded as PHP extension. If you don't have any access to the php.ini file to activate it, you have to adjust the image size manually before uploading.

- My question isn't answered here!
Sorry, no more FAQ entries for now. Please visit my board at https://www.chrissyx.com/forum/ for more help.
Or write me an email: [email protected]
Sorry, no more FAQ entries for now. Please visit my board at https://www.chrissyx.com/forum/ for more help.
Or write me an email: [email protected]

## BBCode reference
- [b]Bolded text[/b]
Expand All @@ -91,7 +91,7 @@ Or write me an email: [email protected]
- [list][*]List entry[/list]

## Credits
© 2008-2022 by Chrissyx
© 2008-2022 by Chrissyx
Powered by V4 Technology
https://www.chrissyx.de/
https://www.chrissyx.com/
Expand Down
20 changes: 10 additions & 10 deletions Readme.htm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</head>
<body>
<h1>Chrissyx Homepage Scripts - Newsscript</h1>
<h2>Version: 1.0.7</h2>
<h2>Version: 1.0.7.1</h2>
<h3><a href="#ENGLISH">ENGLISH - CLICK HERE!</a></h3>

<h4>Inhalt</h4>
Expand Down Expand Up @@ -61,13 +61,13 @@ <h4 id="de_faq">FAQ</h4>
<li style="margin-bottom:10px;">Was kann alles der Newsticker?<br />
Er bietet eine Auflistung der letzten X News f&uuml;r deine Seite selbst, eine RSS Newsfeed Anbindung und sogar die M&ouml;glichkeit, deine Newstitel auf anderen Webseiten einzubinden. F&uuml;r die interne Einbindung, f&uuml;ge diesen Code an der gew&uuml;nschten Stelle in den Quelltext deiner Seite ein:<br />
<code>&lt;!-- CHS - Newsscript - Ticker --&gt;&lt;?php include('newsticker.php'); ?&gt;&lt;!-- /CHS - Newsscript - Ticker --&gt;</code><br />
F&uuml;r die RSS Anbindung solltest Du deinen Besuchern einen Link mit einer passenden Grafik zur Verf&uuml;gung stellen. Der Link ergibt sich nat&uuml;rlich aus dem Ort, wo Du den Ticker bzw. das Script betreibst. Auf jeden Fall endet er mit &quot;/newsticker.php?type=rss&quot;, z.B. &quot;http://www.meineseite.tld/newsticker.php?type=rss&quot;. Es bietet sich an, den Link unmittelbar neben der internen Ausgabe des Newstickers zu platzieren.<br />
Die Einbindung der letzten News auf anderen Webseiten erfolgt &auml;hnlich, d.h. anstatt &quot;type=rss&quot; einfach &quot;type=extern&quot; anh&auml;ngen. Lautet der Link also z.B. &quot;http://www.meineseite.tld/newsticker.php?type=extern&quot;, so muss man<br />
<code>&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.meineseite.tld/newsticker.php?type=extern&quot;&gt;&lt;/script&gt;</code><br />
F&uuml;r die RSS Anbindung solltest Du deinen Besuchern einen Link mit einer passenden Grafik zur Verf&uuml;gung stellen. Der Link ergibt sich nat&uuml;rlich aus dem Ort, wo Du den Ticker bzw. das Script betreibst. Auf jeden Fall endet er mit &quot;/newsticker.php?type=rss&quot;, z.B. &quot;https://www.meineseite.tld/newsticker.php?type=rss&quot;. Es bietet sich an, den Link unmittelbar neben der internen Ausgabe des Newstickers zu platzieren.<br />
Die Einbindung der letzten News auf anderen Webseiten erfolgt &auml;hnlich, d.h. anstatt &quot;type=rss&quot; einfach &quot;type=extern&quot; anh&auml;ngen. Lautet der Link also z.B. &quot;https://www.meineseite.tld/newsticker.php?type=extern&quot;, so muss man<br />
<code>&lt;script type=&quot;text/javascript&quot; src=&quot;https://www.meineseite.tld/newsticker.php?type=extern&quot;&gt;&lt;/script&gt;</code><br />
in den Quellcode seiner Seite einbinden f&uuml;r eine Anzeige deiner letzten News. Willst Du diesen Service anbieten, so musst Du den Code auf deiner Seite pr&auml;sentieren und nat&uuml;rlich den Link wie oben beschrieben vorher anpassen. Die Anzahl der gezeigten News h&auml;ngt im Wesentlichen von der Einstellung ab, die Du w&auml;hrend der Installation triffst. Allerdings kann man im externen Modus und beim RSS Feed diese nochmals individualisieren, d.h. wenn Du z.B. die letzten 5 News bei deinen internen Ticker ausgeben l&auml;sst, so werden es auch 5 beim RSS Newsfeed und der externen Ausgabe sein. Um nun eine h&ouml;here Anzahl zu erm&ouml;glichen, kann man einfach die Anzahl per &quot;&amp;anz=X&quot; angeben, in dem man es an den vorhandenen Link h&auml;ngt. Z.B. f&uuml;r 10 News im RSS Feed:<br />
http://www.meineseite.tld/newsticker.php?type=rss&amp;anz=10<br />
https://www.meineseite.tld/newsticker.php?type=rss&amp;anz=10<br />
Oder 7 News bei der externen Einbindung:<br />
<code>&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.meineseite.tld/newsticker.php?type=extern&amp;anz=7&quot;&gt;&lt;/script&gt;</code><br />
<code>&lt;script type=&quot;text/javascript&quot; src=&quot;https://www.meineseite.tld/newsticker.php?type=extern&amp;anz=7&quot;&gt;&lt;/script&gt;</code><br />
Auch das sollte man an geeigneter Stelle den Interessierten mitteilen.</li>
<li style="margin-bottom:10px;">Ich erhalte beim Aufruf die Meldung &quot;ERROR: Datei/Ordner nicht gefunden!&quot;?!?<br />
Lies dir die Installationsanleitung hier genaustens durch! Achte darauf, dass Ordnerpfade immer mit &quot;/&quot; enden.</li>
Expand Down Expand Up @@ -164,13 +164,13 @@ <h4 id="en_faq">FAQ</h4>
Just a quick overview for now: Use this code for internal listing of headlines on your homepage:<br />
<code>&lt;!-- CHS - Newsscript - Ticker --&gt;&lt;?php include('newsticker.php'); ?&gt;&lt;!-- /CHS - Newsscript - Ticker --&gt;</code><br />
This example link will provide a RSS Newsfeed:<br />
http://www.mysite.tld/newsticker.php?type=rss<br />
https://www.mysite.tld/newsticker.php?type=rss<br />
This example code will provide the latest headlines for an external website:<br />
<code>&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.mysite.tld/newsticker.php?type=extern&quot;&gt;&lt;/script&gt;</code><br />
<code>&lt;script type=&quot;text/javascript&quot; src=&quot;https://www.mysite.tld/newsticker.php?type=extern&quot;&gt;&lt;/script&gt;</code><br />
To change the number of displayed news apart from the setting you've entered during installation, add &quot;&amp;anz=X&quot; to each link, e.g. 10 entries for the RSS Feed:<br />
http://www.mysite.tld/newsticker.php?type=rss&amp;anz=10<br />
https://www.mysite.tld/newsticker.php?type=rss&amp;anz=10<br />
Or last 7 headlines for another website displaying your news:<br />
<code>&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.mysite.tld/newsticker.php?type=extern&amp;anz=7&quot;&gt;&lt;/script&gt;</code><br />
<code>&lt;script type=&quot;text/javascript&quot; src=&quot;https://www.mysite.tld/newsticker.php?type=extern&amp;anz=7&quot;&gt;&lt;/script&gt;</code><br />
You should provide your visitors these informations somewhere, thought.<br />
Hope you got a clue about the features anyway. ;)</li>
<li style="margin-bottom:10px;">I'm getting a message like &quot;ERROR: Datei/Ordner nicht gefunden!&quot;?!?<br />
Expand Down
Loading

0 comments on commit ed69854

Please sign in to comment.