Home Private Messages Search
CPG Dragonfly™ CMS Dedicated Server & Bandwidth Sponsored by DedicatedNOW
Toggle Content
 
Frequently Asked Questions


Main | Search

Question
Sort: Ascending / Descending
So, what is getlink() and how can I use it?
What about adminlink()?
What are $mainindex and $adminindex?
What happened to modules.php?

Answer
So, what is getlink() and how can I use it?

getlink() is a function we created for ease of writing URLs. Using getlink() is a much better alternative to using $mainindex when writing URLs.

To convert a URL using modules.php, follow this example:

modules.php
PHP:
echo '<a href="modules.php?name=Search">Search</a>';

getlink()
PHP:
echo '<a href="'.getlink('Search').'">Search</a>';

Read more on function getlink() here


What about adminlink()?

The same concept applies for adminlink().

To convert a URL using admin.php, follow this example:

admin.php
PHP:
echo '<a href="admin.php?op=logout">Logout</a>';

adminlink()
PHP:
echo '<a href="'.adminlink('logout').'">Logout</a>';

Read more on function adminlink() here


What are $mainindex and $adminindex?

$mainindex is a new variable that we created for use in config.php. A default value of index.php is assigned to this variable, and acts as the main index page. Perhaps you wish to use cms.php instead of index.php for your homepage and calls to modules. Simply change the value of $mainindex in config.php and rename the file index.php to the name of your choice.

Read more on $mainindex here


$adminindex serves the same purpose, just for the administration menu.

Read more on $adminindex here


What happened to modules.php?

While developing CPG-Nuke, we moved all functions from modules.php to index.php. Thus, the call for a module changed from modules.php?name= to index.php?name=.

However, we left modules.php in place for compatibility with third party addons and themes.


 
   Toggle Content User Info

Welcome Anonymous

Nickname
Password
(Register)

   Toggle Content Community

Support for DragonflyCMS in a other languages:

Deutsch
Español

   Toggle Content X-links
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
Interactive software released under GNU GPL, Code Credits, Privacy Policy