The EuroCMS Routes Manager

authorversiondate
Imri Palojadraft06-09-2022

As of writing this still needs to be renamed to the Routes manager in the actual code.

Routes manager for EuroCMS.

With Routes Manager you can register a REQUEST_URI, IP protect the content, select which content to load from other objects in the current domain.

For example: files, modules, pages(articles,blogposts, etc...). You can register the /api url, and have the API module handle the requests of that URL, and also IP protect the URL.

You can also create routes, like robots.txt, humans.txt, sitemap.xml. These have a builtin generator.

You can make custom db queries for when someone accesses a specific url. For example, when someone accesses /modules, you can make it query the modules dir, and have it output it in a json format. Figure out how to code this.

DB table structure

route_iddomain_iduser_idgroup_idrequesttabletable_nametable_idip_denyip_allowpworduser_lockstatus
1111/tutorials/how-to-eurocmspagespage_id34nullnull{BCRYPT}1enabled
211/apimodulesmodule_id54all127.0.0.2null3,5enabled
311/file/file.pngfilesfile_id5nullnullnullnullenabled
411/robots.txtobjectobject_id50nullnullnullnullenabled
511/hackers.txtobjectobject_id52nullnullnullnullenabled
611/sitemap.xmlobjectobject_id55nullnullnullnullenabled
711/Files/FileUploadajaxajax_id2127.0.0.1127.0.0.2nullnullenabled
811/modules.jsonfilesfile_id100nullnullnullnulldisabled
9111/api/users ??? contemplate on the whole rowapiapi_id54all127.0.0.1,127.0.0.2{BCRYPT}nullenabled

Permissions

namedescription
route_addThe ability to add routes
route_deleteThe ability to delete routes
route_modifyThe ability to modify existing routes
route_ipThe ability to IP protect a routes
route_ajaxThe ability to add AJAX routes
route_objectThe ability to add auto generated files from variables(robots.txt/sitemap.xml/contribute.json)

Objects

You can add an object as a content. That is a special file, either hard pasted or auto generated from databases. Here are some examples:

robots.txt

https://developers.google.com/search/docs/advanced/crawling/overview-google-crawlers

https://developers.google.com/search/docs/advanced/crawling/verifying-googlebot

https://developers.google.com/search/apis/ipranges/googlebot.json

sitemap.xml

When you create an object file, you can hard paste your content, or generate them from variables. When auto generated, you have to build the structure on how you can add things.

For, instance, you can create the below constant, herein you can add "variables". The location can be the $path variable, the lastmod, can be the $modify_date, so when you modify a page content, and someone queries the sitemap.xml, the modified date will de displayed here.

Those are existing variables that you can query for this file. What about none existing variables, such as changefreq and priority? Well you can create variables , and set where those variables need to be displayed.

When you click Create variables "" you can select the name, the type of input required, and also which other module needs this setting. Example:

nameinput typeinput valuesshort_descriptionlong_description
prioritynumberThe priority of this URL relative to other URLs on your site. Valid values range from 0.0 to 1.0. This value does not affect how your pages are compared to pages on other sites—it only lets the search engines know which pages you deem most important for the crawlers.The default priority of a page is 0.5.

Please note that the priority you assign to a page is not likely to influence the position of your URLs in a search engine's result pages. Search engines may use this information when selecting between URLs on the same site, so you can use this tag to increase the likelihood that your most important pages are present in a search index.

Also, please note that assigning a high priority to all of the URLs on your site is not likely to help you. Since the priority is relative, it is only used to select between URLs on your site.
lastmoddateThe date of last modification of the page. This date should be in W3C Datetime format. This format allows you to omit the time portion, if desired, and use YYYY-MM-DD.Note that the date must be set to the date the linked page was last modified, not when the sitemap is generated.

Note also that this tag is separate from the If-Modified-Since (304) header the server can return, and search engines may use the information from both sources differently.
changefreqselectalways,hourly,daily,weekly,monthly,yearly,neverHow frequently the page is likely to change. This value provides general information to search engines and may not correlate exactly to how often they crawl the page
<?xml version="1.0" encoding="UTF-8"?>

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

   <url>

      <loc>http://www.example.com/</loc>

      <lastmod>2005-01-01</lastmod>

      <changefreq>monthly</changefreq>

      <priority>0.8</priority>

   </url>

</urlset>

from https://sitemaps.org/protocol.html

security.txt

Example:

Contact: mailto:security@eurobytes.eu
Expires: 2022-07-30T19:00:00.000Z
Encryption: https://eurobytes.eu/.pgp
Acknowledgments: https://eurobytes.eu/hall-of-fame
Preferred-Languages: en
Canonical: https://eurobytes.eu/.well-known/security.txt
Policy: https://eurobytes.eu/security-policy
Hiring: https://eurobytes.eu/vacancies

https://securitytxt.org/

humanstxt.org

/* TEAM */
	Chef:
	Contact: hello [at] humanstxt.org
	Twitter: @{handle}
	From: {City, state, Country}


/* THANKS */

	EN Translator: {name}
	Twitter: @{handle}
	From: {City, state, Country}

/* SITE */
	Last update: YYYY/MM/DD
	Language: English / Dutch / German
	Doctype: HTML5
	IDE: Phpstorm, THE GIMP, draw.io, Firefox (Developer Edition)

https://humanstxt.org/

RSS Feed

You can create your XML structure, and fill it with your variables:

<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">

<channel>
  <title>W3Schools Home Page</title>
  <link>https://www.w3schools.com</link>
  <description>Free web building tutorials</description>
  <item>
    <title>RSS Tutorial</title>
    <link>https://www.w3schools.com/xml/xml_rss.asp</link>
    <description>New RSS tutorial on W3Schools</description>
  </item>
  <item>
    <title>XML Tutorial</title>
    <link>https://www.w3schools.com/xml</link>
    <description>New XML tutorial on W3Schools</description>
  </item>
</channel>

</rss>

https://schemas.liquid-technologies.com/w3c/rss/2.0.1.9/?page=rss-2_0_1-rev9_xsd.html

https://www.w3schools.com/xml/xml_rss.asp