define("TRUE_PHP_SELF", $current_page);
if (preg_match("/\/(administration)\//", $current_page))
{
define("TRUE_PHP_SELF", $current_page);
}
else if (preg_match("/".preg_replace("/([a-zA-Z0-9_]+)(\.php|\.html)?/", "$1", $settings['opening_page'])."/", preg_replace("/\/([a-zA-Z0-9_]+)(\.php|\.html)?/", "$1", $current_page)))
{
define("TRUE_PHP_SELF", preg_replace("/\/([a-zA-Z0-9_]+)(\.php|\.html)?/", "/$1", $current_page));
}
else
{
define("TRUE_PHP_SELF", $current_page);
}
if (preg_match("/\/(administration)\//", $current_page))
{
define("TRUE_PHP_SELF", $current_page);
}
else if (preg_match("/".preg_replace("/([a-zA-Z0-9_]+)(\.php|\.html)?/", "$1", $settings['opening_page'])."/", preg_replace("/\/([a-zA-Z0-9_]+)(\.php|\.html)?/", "$1", $current_page)))
{
define("TRUE_PHP_SELF", preg_replace("/\/([a-zA-Z0-9_]+)(\.php|\.html)?/", "/$1.html", $current_page));
}
else
{
define("TRUE_PHP_SELF", $current_page);
}
Quote
spunk wrote:
Ahhh THIS works!
Thank you Ankur! :G
The Code in Post #1 is different...
Quote
Ankur wrote:Quote
Rush_ wrote:
that's good. but not...
for each link replaced it need to make a db query to get "news-description". do u think its normal, me not. brrrr
This doesn't work in that way which will make bunch of DB Queries to database. Here is how it works :
1. Find How many News links are there on the page.
Ex: http://mysite.com/news.php?readmore=1
http://mysite.com/news.php?readmore=2
http://mysite.com/news.php?readmore=3
And it will combine it to a single/1 query :
dbquery("SELECT news_subject FROM ".DB_NEWS." WHERE news_id IN(1,2,3) " )
And this is all done before the page loads. Hence, time efficient and memory efficient ;)
Quote
Sprunkas wrote:
I suggest you to fix the UTF8 because others symbols don't displays
Quote
Rush_ wrote:
hm, that's more better, but anyway incorrect
Category Forum
Addons Open TestingLabels
None yet
Statistics
9 participants
Notifications
You are not receiving notifications from this thread.
Related Questions