Tiny News Feed
News List
Home Page
News List
Search
Editing
Edit This News
Please correct the information in the form below in order to edit this page on your website.
Page URL:
http://mimimi.software/demos/TinyNewsFeed/news/
Leave this field blank if you want to automatically generate the page URL. In this case, it will consist of a random set of characters.
Visible For All
Title:
This field contains the name of the publication in listings. It is also the string of the page Title tag.
Short Text:
In this example, we will read the list of installed viewers and put it into the variable $TEST. We will then iterate through this list to print its elements.
This field contains short introductory text that appears in publication listings and at the top of the publication page. It is also the string of the page Meta Description tag.
Full Text:
<p>You can use this example to get all the names of the viewers installed in your web application.</p><hr><h4>Theory</h4><p>Note that a viewer is a module designed to read specific database records located at the URLs associated with that viewer.</p><blockquote><p><small>The first segment in such URLs is always equal to the viewer name. For example, the locator <code>https://your.site/news/some-url-path</code> is associated with the <code>News</code> viewer.</small></p></blockquote><p>All viewer modules are located at a common folder named <code>tiny.news.feed/Viewers</code>. Each viewer is a named subfolder (for example, <code>tiny.news.feed/Viewers/Search</code>) and a nested PHP file of the same name (for example, <code>tiny.news.feed/Viewers/Search/Search.php</code>) with a certain class and methods declared there.</p><h4>Source Code</h4><p>Please paste this code snippet into your template to see how it works.</p><blockquote><p><small>Let's experiment with a template like <code>tiny.news.feed/Themes/default/404.tpl</code> by pasting code into it and then opening some <a href="some-indefinite-vague-non-existent-abracadabra" rel="nofollow">non-existent page</a> associated with that template.</small></p></blockquote><pre><?php $TEST = $cms->getViewers(); foreach ( $TEST as $name ) { echo $name . ' <br>'; } ?></pre><blockquote><p><small>Note that the <code>$cms</code> variable is a system pointer to your web application. And <code>getViewers</code> is a public method for reading the viewer names. If you are interested in the algorithm of this method, look at the file <code>tiny.news.feed/Application.php</code>.</small></p></blockquote><p>And <a href="news/demo-posts/faq/how-to-get-names-of-relevant-viewers">here</a> you can read the answer to another question regarding reading a list of viewers that support only specific functionality.</p><p><small>* This page is a demo post designed to display page content for testers. You need <a href="news/demo-posts/faq/how-to-get-names-of-installed-viewers/delete" rel="nofollow">delete this page</a> when you run the website in production mode.</small></p>
You can use valid HTML markup for this field. All HTML tag attributes will be removed for security reasons except attribute href="some-url" for tag <a> and attribute src="some-url" for tag <img>.
Image to upload:
The file length should not exceed 5 megabytes. File type: WEBP, JPEG, PNG, SVG, GIF or BMP.
Image URL:
http://mimimi.software/demos/TinyNewsFeed/
You should enter the image URL manually if your page needs to have an image with a specific file name. Otherwise, the image URL will be set to the name of the uploaded file. If you need an external image on your page, enter its absolute URL here and do not use the input field above to upload the image.
Send »
× Cancel