Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Navigation
Latest Addons
AD Gallery 63
SyntaxHighlighte... 51
Newsletters v4.03 114
Facebook Like Box 132
Newsletters v4.02 60
Metro 170
Facebook Connect 173
Shoutbox Panel 129
Redactor for PHP... 107
MI Floating Side... 109
Facebook Login/R... 155
Avatar Studio v2.03 180
Relationship Sta... 98
Sexual Orientati... 116
Fisherman 144
Popular Addons
iTheme2 5808
Arise 5805
User Control v1.23 4623
Event Calendar 4053
Photowidget panel 3888
Radio-Theme red2... 3359
Highslide Gallery 3315
CSS/JavaScript D... 3234
Facebook Connect... 2989
Dynamic Menu 2895
Slideshow Lightb... 2727
L-AMANT 2660
Enigma 2637
2Dark 2608
Black 2580
View Thread
Who is here? 1 guest(s)
 Print Thread
Panel Restriction
dayzign
Hi guys, i got situation here...

my front page has 3 columns page (default php-fusion interface), so how is it possible if i want to make it only 2 columns (let say left panel and center panel, no right panel), just right after i click on any news link in the first page (which is has 3 columns).... is there something to do with panel restriction? (exclude or include).....

Thx in advance.....
Edited by dayzign on 10-07-2012 17:17
 
Halisson Ricardo
-
dayzign wrote:

Hi guys, i got situation here...

my front page has 3 columns page (default php-fusion interface), so how is it possible if i want to make it only 2 columns (let say left panel and center panel, no right panel), just right after i click on any news link in the first page (which is has 3 columns).... is there something to do with panel restriction? (exclude or include).....

Thx in advance.....


If you do not find a solution within the administrative panel interface, you can make a small modification in the file: \includes\theme_functions_include.php

find a function called "check_panel_status", and make a change from line 44.


if (is_array($exclude_list)) {

if ( (isset($_GET['readmore'])) && (isnum($_GET['readmore'])) ) {

if ($side == "right") { return false; }

} else {

$script_url = explode("/", $_SERVER['PHP_SELF']);
$url_count = count($script_url);
$base_url_count = substr_count(BASEDIR, "/")+1;
$match_url = "";
while ($base_url_count != 0) {
$current = $url_count - $base_url_count;
$match_url .= "/".$script_url[$current];
$base_url_count--;
}
if (!in_array($match_url, $exclude_list) && !in_array($match_url.(FUSION_QUERY ? "?".FUSION_QUERY : ""), $exclude_list)) {
return true;
} else {
return false;
}

}

} else {
return true;
}



PS. Remember to change the parameter "right" to the side you want to delete. :)

-
Edited by Halisson Ricardo on 10-07-2012 18:20
Halisson Ricardo
V8 PromoCom Team Leader
NSS Brazil Admin Leader
©
 
www.7ebox.com
Craig
Hi there,

Go and install FP News Panel...

http://www.php-fu...don_id=352

Then read this....

http://www.php-fu...ost_162956

That should help you out.

Also Admin >>> Settings >>> Main if you want to exclude right panels on news.php just enter /news.php in the textbox and save.


Good Luck! Wink
 
http://www.fusiontube.co.uk/
Halisson Ricardo
Fangree_Craig wrote:

Hi there,

Go and install FP News Panel...

http://www.php-fu...don_id=352

Then read this....

http://www.php-fu...ost_162956

That should help you out.

Also Admin >>> Settings >>> Main if you want to exclude right panels on news.php just enter /news.php in the textbox and save.


Good Luck! ;)


Craig, I think this is not the solution.

The admin panel provides the functionality to hide panels, but does not solve the problem.

dayzign want the three columns on the first page ("news.php"),
but when any news is read ("?readmore"), the left or right is automatically hidden.

dayzign wrote:
just right after i click on any news link in the first page (which is has 3 columns)...


So, a workaround is to make a slight modification:


if ( (isset($_GET['readmore'])) && (isnum($_GET['readmore'])) ) {
if ($side == "right") { return false; }
}


All sides are displayed normally. but when any news is read, one side will be hidden.

If I understand the doubt, I think this is the answer. :)

-
Edited by Halisson Ricardo on 11-07-2012 01:19
Halisson Ricardo
V8 PromoCom Team Leader
NSS Brazil Admin Leader
©
 
www.7ebox.com
dayzign


If you do not find a solution within the administrative panel interface, you can make a small modification in the file: \includes\theme_functions_include.php

find a function called "check_panel_status", and make a change from line 44.


if (is_array($exclude_list)) {

if ( (isset($_GET['readmore'])) && (isnum($_GET['readmore'])) ) {

if ($side == "right") { return false; }

} else {

$script_url = explode("/", $_SERVER['PHP_SELF']);
$url_count = count($script_url);
$base_url_count = substr_count(BASEDIR, "/")+1;
$match_url = "";
while ($base_url_count != 0) {
$current = $url_count - $base_url_count;
$match_url .= "/".$script_url[$current];
$base_url_count--;
}
if (!in_array($match_url, $exclude_list) && !in_array($match_url.(FUSION_QUERY ? "?".FUSION_QUERY : ""), $exclude_list)) {
return true;
} else {
return false;
}

}

} else {
return true;
}



PS. Remember to change the parameter "right" to the side you want to delete. :)

-


Hello halisson, i already made change from the script you gave, but the next page still shows 3 columns after click.... did i miss something here?

PS. Remember to change the parameter "right" to the side you want to delete. :) ----> it means :
Download source  Code
if ($side == "right") { return false; }


, isnt it?
 
Halisson Ricardo
-

dayzign wrote:

Hello halisson, i already made change from the script you gave, but the next page still shows 3 columns after click.... did i miss something here?

Download source  Code
if ($side == "right") { return false; }


, isnt it?



If there is any news reading (a url with a parameter called "?readmore") all panels that are specified on the side (right or left) will be hidden.

.../news.php -> Without MOD. All sides are displayed normally (of course, the panels are hidden, if they are configured as hidden in admin panel).

.../news.php?readmore=... -> The MOD works by making a reading of $ _GET. If there is the "readmore", it returns "false", and hides all the specified side panels.

The changed file is attached. Replace the original file. Good Luck. :)

-
Halisson Ricardo attached the following file:
theme_functions_include.zip [3.17kB / 65 Downloads]

Halisson Ricardo
V8 PromoCom Team Leader
NSS Brazil Admin Leader
©
 
www.7ebox.com
Ankur
Please don't make it complicated Bad

Why don't you simply Add the Site Opening Page (e.g /news.php) into Admin Panel --> Settings --> Main --> Exclude Right Panels ! Simple ! Good
ankurthakur.co.cc/images/freelancer.png
 
http://ankurthakur.in/
dayzign
@Ankur : Hallison said :
dayzign want the three columns on the first page ("news.php"),
but when any news is read ("?readmore"), the left or right is automatically hidden.


@Hallison : still show 3 columns after click, mate, maybe because a lot of changes i made on the code, but at least you showed me which part of the code that i have to handle with, thanks anyway
If there is any news reading (a url with a parameter called "?readmore") all panels that are specified on the side (right or left) will be hidden.

.../news.php -> Without MOD. All sides are displayed normally (of course, the panels are hidden, if they are configured as hidden in admin panel).

.../news.php?readmore=... -> The MOD works by making a reading of $ _GET. If there is the "readmore", it returns "false", and hides all the specified side panels.

The changed file is attached. Replace the original file. Good Luck. :)

-
 
Halisson Ricardo
-

Ankur wrote:

Please don't make it complicated Bad

Why don't you simply Add the Site Opening Page (e.g /news.php) into Admin Panel --> Settings --> Main --> Exclude Right Panels ! Simple ! Good


Ankur, If you do not understand the question, the feature of the administrative panel is not enough to solve. But if you really be saying that the request for aid from dayzign is invalid, then not get me wrong, you have worked hard for the growth of PHPFUSION, but if the PHPFUSION is a project of open source, this implies one of the reasons for their existence: The possibility of change. And that's one thing That has to be done democratically. Smile

dayzign wrote:

@Hallison : still show 3 columns after click, mate, maybe because a lot of changes i made on the code, but at least you showed me which part of the code that i have to handle with, thanks anyway...


You're welcome. Good luck! Good

-
Halisson Ricardo
V8 PromoCom Team Leader
NSS Brazil Admin Leader
©
 
www.7ebox.com
Ankur
halisson wrote:

Ankur, If you do not understand the question, the feature of the administrative panel is not enough to solve. But if you really be saying that the request for aid from dayzign is invalid, then not get me wrong, you have worked hard for the growth of PHPFUSION, but if the PHPFUSION is a project of open source, this implies one of the reasons for their existence: The possibility of change. And that's one thing That has to be done democratically. :)

-


Oh ! My bad ! Sorry www.php-fusion.co.uk/images/smiley/frown.gif

But IMO, the Code :
if (!in_array($match_url, $exclude_list) && !in_array($match_url.(FUSION_QUERY ? "?".FUSION_QUERY : ""), $exclude_list)) {
return true;
} else {
return false;
}

works for both /news.php and /news.php?readmore=1. Tested ! www.php-fusion.co.uk/images/smiley/cool.gif
ankurthakur.co.cc/images/freelancer.png
 
http://ankurthakur.in/
Halisson Ricardo
-

Ankur wrote:

But IMO, the Code :
if (!in_array($match_url, $exclude_list) && !in_array($match_url.(FUSION_QUERY ? "?".FUSION_QUERY : ""Wink, $exclude_list)) {
return true;
} else {
return false;
}

works for both /news.php and /news.php?readmore=1. Tested ! www.php-fusion.co.uk/images/smiley/cool.gif


This seems to be a good alternative. Smile
But specifically to the page of the news, I think that is not the solution.
If I understand your code, any url that contain parameters, the system will hide one side,
no matter if it is a page of news, am I right?

Regards,

-
Edited by Ankur on 12-07-2012 16:14
Halisson Ricardo
V8 PromoCom Team Leader
NSS Brazil Admin Leader
©
 
www.7ebox.com
Craig
Stick ankurs code in a upper center panel and enable for /news.php only then it will only do as it on news.php like you want.
 
http://www.fusiontube.co.uk/
Ankur
halisson wrote:

This seems to be a good alternative. Smile
But specifically to the page of the news, I think that is not the solution.
If I understand your code, any url that contain parameters, the system will hide one side,
no matter if it is a page of news, am I right?
-


Fangree_Craig wrote:

Stick ankurs code in a upper center panel and enable for /news.php only then it will only do as it on news.php like you want.


This is not my Code... Its the function check_panel_status() in includes/theme_functions_include.php. It works normally as it should even when there are any QUERY Parameters in the URL Cool
ankurthakur.co.cc/images/freelancer.png
 
http://ankurthakur.in/
Craig
So that code is not for putting in a panel rather than moding core files?

Well there must be solution to do it in a panel without moding the themes functions include files.

If there is a function then surly that function can be used?
 
http://www.fusiontube.co.uk/
Halisson Ricardo
-

@Ankur and @Fangree_Craig,

I still think you two did not understand well the question of dayzign.

The doubt the dayzign consist of two steps:

First: The main page has to display all panels.
(Except, of course, if a panel was configured as hidden in admin panel).

Second: When anyone read any news (parameter: ?readmore), one of the panels are hidden automatically.

Is there a native solution for this? I think not. What can we
is to hide one side when a particular page is displayed,
but we can not use two different situations for the same page.

Therefore, I proposed a slight change in the core.

But let him decide for yourself if the answers provided here in the topic are sufficient. Smile

Regards,

-
Edited by Halisson Ricardo on 12-07-2012 16:36
Halisson Ricardo
V8 PromoCom Team Leader
NSS Brazil Admin Leader
©
 
www.7ebox.com
Craig
I understand fully what he wants to do thanks. My first language is English. Smile
 
http://www.fusiontube.co.uk/
Halisson Ricardo
-

Fangree_Craig wrote:

I understand fully what he wants to do thanks. My first language is English. Smile


Of course. I understand this as a joke! Pfft

-
Halisson Ricardo
V8 PromoCom Team Leader
NSS Brazil Admin Leader
©
 
www.7ebox.com
Craig
NO, I am not joking I fully understand what the guy is trying to do. Why would I joke about that?

You have too much to say, tone it down a bit. Wink
 
http://www.fusiontube.co.uk/
Halisson Ricardo
-

Fangree_Craig wrote:

NO, I am not joking I fully understand what the guy is trying to do. Why would I joke about that?

You have too much to say, tone it down a bit. Wink


You said you Understood the question of the topic because his first language is English.
Obviously, you just needed to say: "I had understood". the second part of the sentence
I Understood That was a joke. let's forget it. Smile

PS. I think it's my bad English that causes all this confusion in my answers.
Had problems with this some time ago here on the forum.


-
Edited by Halisson Ricardo on 12-07-2012 16:57
Halisson Ricardo
V8 PromoCom Team Leader
NSS Brazil Admin Leader
©
 
www.7ebox.com
Craig
Let me propose a challenge to you.

Lets see who out of you and me can do this for him without moding the themes function include or any other core files.

I believe there's a way to do this by simply adding some code into a center panel however I have still yet to find this code but I will keep at it until I do. hehe!!

Good Luck!
 
http://www.fusiontube.co.uk/
Jump to Forum:
Similar Threads
Thread Forum Replies Last Post
Birthday panel Panels and Infusions 1 21-05-2013 21:12
Link panel to another subdomain Content Administration 3 19-05-2013 08:50
Stop Forum Spam Panel Official releases [Panels] 14 12-05-2013 19:51
edit login side panel. Content Administration 3 10-05-2013 18:45
Theme Control Panel Content Administration 2 08-05-2013 13:19
Official Home of PHP-Fusion uses cookies. Some may already have been set. Read more about our Cookies here.
Please click the button I Consent Cookies to hide this bar and accept our cookies. If you continue to use the site with no action taken, we'll assume that you consent our cookies anyway.
Cookiebar Panel byVenue