Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Exclude pages on new Panels (Admin > System Settings > Panels)

Asked Modified Viewed 1,586 times
I
ikandi
I
ikandi 10
  • Junior Member, joined since
  • Contributed 48 posts on the community forums.
  • Started 15 threads in the forums
  • Started this discussions
asked
Junior Member

Hello all,

I am adding some widget code for Public Comments and Ratings. I don't wish to use the in-built PHPFusion code for this purpose.

By adding the widget code into new panels, these can be seen on every page throughout the site. Great. But..

I wish to exclude the panels on certain pages and page types that don't need to see them (or more specifically, I don't want them to be seen on).

These include FAQ's and Forums mostly. I don't use News or Photos but assume others would.

Problem is, the exclude pages don't seem to work for sub-Forums such as:

infusions/forum/index.php?viewforum&forum_id=16


I also need a method to allow the exclusion to cover a range of pages, such as:

infusions/articles/articles.php?cat_id= [EVERYTHING]


infusions/forum/viewthread.php?thread_id= [EVERYTHING]


infusions/faq/faq.php?cat_id=[EVERYTHING]


Otherwise, I have to account for every new Article Category, FAQ entry and Forum entry as a separate excluded page, which is not very practical as this will require tedious manual entry in the mySQL Panels table.

Any assistance on this would be appreciated.

Ikandi
0 replies

7 posts

I
ikandi
I
ikandi 10
  • Junior Member, joined since
  • Contributed 48 posts on the community forums.
  • Started 15 threads in the forums
  • Started this discussions
answered
Junior Member

I s there a wildcard character that can be used at the tail of the code?
0 replies
I
ikandi
I
ikandi 10
  • Junior Member, joined since
  • Contributed 48 posts on the community forums.
  • Started 15 threads in the forums
  • Started this discussions
answered
Junior Member

With this code, I am wondering whether the ampersand character is the offending culprit?

infusions/forum/index.php?viewforum&forum_id=16
0 replies
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

A specific widget or panel? Widget refers to the custom page widget (module), it only runs on Custom Page.

Panel refers to the site wide column elements, which can be excluded on Settings Panel Exclusion List.

Which one are we looking at here? :D

Screenshots in elaborating your problem will be good to help us help you. You can use Snippet Tool in windows. The image upload in this site without problem.

If you are using panels, in Admin Panel > Main Settings, there are panel exclusion list for pages.

infusions/forum/viewforum&forum_id

I'm responding because we might be looking at an issue here which I would need to increment. Panel exclusions have not been extensively tested as they are copied from V.7.0.3, but we have a method that you can close down the entire panel columns built into 9.

In your theme.php, you can do a custom rule.

File: whatever-theme/theme.php

<?php
 $panels = \PHPFusion\Panels::getInstance();
 $panels->hide_panel(\PHPFusion\Panels::PANEL_AU_CENTER);
/*
 const PANEL_LEFT = 1;
 const PANEL_U_CENTER = 2;
 const PANEL_L_CENTER = 3;
 const PANEL_RIGHT = 4;
 const PANEL_AU_CENTER = 5;
 const PANEL_BL_CENTER = 6;
 const PANEL_USER1 = 7;
 const PANEL_USER2 = 8;
 const PANEL_USER3 = 9;
 const PANEL_USER4 = 10;
*/


But that being said, you are only looking to exclude on certain pages, the panel exclusion list is only made to exclude panels on 1=1 url match. i.e. forum_id=16 and not [EVERYTHING], so I am afraid that wild card is not supported at the moment. I will need to increment this or at least double check it. If it's not available, I think an ampersand GET value of * should mean everything, possibly do a regex match.

I will get back to this thread.
0 replies
I
ikandi
I
ikandi 10
  • Junior Member, joined since
  • Contributed 48 posts on the community forums.
  • Started 15 threads in the forums
  • Started this discussions
answered
Junior Member

Thank you Chan, I will do some more investigating this week, on the various things you've pointed out above.
0 replies
I
ikandi
I
ikandi 10
  • Junior Member, joined since
  • Contributed 48 posts on the community forums.
  • Started 15 threads in the forums
  • Started this discussions
answered
Junior Member

Ok, getting back to this thread, an example I can give is the following.

1) I have a Disqus Comments account. I wish to use it on my site using Panels, but using it in two ways. I use Disqus Comments for Public/Guest use (rather than the inhouse Comments function which is used for Members only). Disqus also uses the ReCaptcha Authentication method which is safer when dealing with public commenters.
2) The first panel added would be 'Disqus1', which is the Div/Script code block. I ensure all double quote marks are made single quote marks.
3) I create a second panel 'Disqus2', something like this:

<script id='dsq-count-scr' src='//domain.disqus.com/count.js' async></script>

Where domain is the name of your Disqus account. This bit of code is what generates the Disqus UI on the web page, interacting with Disqus1.

4) I have placed this block in the Lower Center section of Admin>Panels, and it shows up on every site page, unless I have put an exclusion range, which I have done.

For the most part, this works really well, except in areas like Forums, Blogs, Custom Pages where I can't wild card these sections (like blog.php/*) so I have to exclude these on a one-to-one basis.

There are other non PHPFusion blocks I wish to add in future too, but administering these singularly is a pain. Not insurmountable if your site is small, but a pain nonetheless. Here are some examples of single page exclusions which work well:

edit_profile.php
latest_comments.php
contact.php
register.php
infusions/weblinks/weblinks.php

Hopefully that clears things up.
Thanks.
Edited by ikandi on 20-12-2018 22:51,
0 replies
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

Ok, that explains your situation.

Now, let's get into some variables from your end.

You mentioned that you wanted to exclude some pages in /infusions/blog.php

What are the implementations like? For example:

Show panel when URL is /infusions/blog.php?readmore=1,
Hide Panel when URL Is /infusions/blog.php?readmore more than 1
Show panel when URL is /infusions/blog.php but do not show when readmore exist.


This will give us the coding insights what we are lacking in respect of the panel management exclusion list.

Also please give me your PHPFusion version currently (9.00 stable release from Sourceforge link, or if you are using our Github versions are 9.02, 9.03 Andromeda , 9.04 Babylon ) which you are using? I need to know which file to work on.

Regards.
0 replies
I
ikandi
I
ikandi 10
  • Junior Member, joined since
  • Contributed 48 posts on the community forums.
  • Started 15 threads in the forums
  • Started this discussions
answered
Junior Member

Hi Chan,

I am using the stable release 9.0.

Re: the exclusion pages. On the basis that any new panel by default shows up across all site pages, if I want to exclude panels from certain pages I have to go into the panel record and add in the exclusion. As written above, mostly it works well, though I find it easier going into mySQL panels table and adding in the excluded pages that way, rather than the GUI in the Admin section.

So the exclusions which are problematic are:

Blogs:
I have to manually hide /infusions/blog.php?readmore=1 and so on, but as the blog expands so too do the pages, and it would be time-consuming and inefficient to hide them manually one by one.

Blog Archive pages (year and month) are an issue too, as these create their own set of pages.

infusions/blog/blog.php?archive=2018&month=12

The Uncategorised category for Blogs doesn't work either, and that's probably due to the string that is used (&filter=false):

infusions/blog/blog.php?cat_id=0&filter=false

Forums:
I have hidden this page ok.

infusions/forum/index.php

However, we start striking issues with the viewthread.php pages, purely because there are so many threads, and these are dynamic, being generated by users on a daily basis. An example:

infusions/forum/viewthread.php?thread_id=nnn

Most of my Forums are member only, so there is no point to show a public commenting panel like Disqus as the public can't see the Forums anyway.

Custom Pages
I only have a handful of these, so I just manually add panel exclusions for these pages.

viewpage.php?page_id=1

It would be good to hide all of these, and if there is an instance where a panel is required on a custom page, then I would just add that back as an inclusion (show).

[b]Article Categories{/b]
Again, I manually hide panels from these. This is a critical area from me so I prefer to be all over it. But I would never say no to a bulk exclude option such as:

infusions/articles/articles.php?cat_id=*

The same would apply to other Category areas such as News, Downloads, Photo Gallery etc. The ability to hide using a wild card would be very useful.

Hope that's enough to go on.
Thanks.
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 7 posts
  • Votes 0 votes
  • Topic users 2 members

2 participants

C
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
I
I
ikandi 10
  • Junior Member, joined since
  • Contributed 48 posts on the community forums.
  • Started 15 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet