Disable a module from a specific view - Drupal 6 - drupal-6

I am working on a site that is made entirely with Drupal 6 and have encountered a small issue. The site in question has two primary purposes;
To display a constant, premade ticker view to our clients and
to allow our staff members to chat with the DrupalChat module. However, the DrupalChat module keeps appearing on the ticker view and I can't find a way to fix that.
So my question is this: Is there any way to disable a specific module from appearing on a specific view, but still be fully available elsewhere on the site?
Thanks!

You need to check with that chat module's configuration page. Check if it allows such a feature.

Related

Rewriting a NodeJS Website using Oracle APEX

My company is upgrading our database hardware to facilitate a data process that potentially may not work (... long story) and in order to somewhat justify the purchase in case the data process does not work, the idea has been floated around of rewriting the site using Oracle APEX. I am wondering about the limitations of APEX and have been unable to find a solution to a few questions.
I currently have a fairly complex, dynamic ecommerce website written in NodeJS and ExpressJS using EJS for templating. There is a lot of logic done inside the .ejs files and the partial templates themselves are re-used in various places throughout the site. We are using ORDS calls from the Node server to retreive data from the database.
I am mainly curious about how one would go about implementing something similar to EJS partial views in APEX. I am pretty new to APEX (2-3 months working on another application) so I haven't gotten too in depth into the way templates are used, past the normal #REGION_01# substitution of simple elements.
I am assuming that most of the logic (deciding whether to show element A or element B based on a value from the database record of the product) would be done in PL/SQL or in a separate JS file.
Is something like the following possible?
A template containing a "Add To Cart" Button, MSRP, Sale Price, and a (HTML) table displaying possible discounts based on the quantity purchased
A template containing product information, like the product ID, name, manufacturer, and a small description of the product
A template combining the previous 2 options and a picture of the product into a row that can be re-used across the site
If someone has experience with this sort of thing, or could point me towards some good reference material on a similar topic, I would appreciate it.
I've been working with Oracle APEX for a while, specially in the front-end department because it does lack a bit in regards templates.
To answer your question. It depends on what you mean by template
If templates are the apex template objects
You can create and customize templates on Shared Components -> Templates. I'm almost sure you need to create new stuff or duplicate because the vanilla ones are locked.
Another option is to create plugins for you app which will function similarly and can be exported/shared with other projects and people.
If Template is just a page that you will keep changing the record displayed
Sure, you can create many things using the a blank page and adding the components. I've on teams developing ERPs, Mobile Apps, Stock Integration with Marketplaces (needed some Java, though) and several custom made Application that are not available out-of-the-box.

In Plone is it possible to remove certain stripped and nasty tags for manager role only?

I'd like to side-step some of the security filtering done by Plone but only for people with manager or site admin roles. I want regular members to be able to add content but that content should still be filtered. Specifically at this moment I'm looking at allowing iFrames for manager role but this question is also more generic. The access to Plone that I'm referring to is a person editing a site page through Plone's standard editing system, TinyMCE.
If you look at the TinyMCE code you'll see that it load some configuration from the server. through the safe_html tranform inside the portal_transforms tool (
see https://github.com/plone/Products.TinyMCE/blob/11b957652846679cf7f441cc956730bd6fc92f87/Products/TinyMCE/utility.py#L499).
You can simply patch the getValidElements method above (adding here some user permission checking before removing/adding stripped tags) but it's not enough: this will simply change TinyMCE behavior (client side) but an evil user can access your site with TinyMCE disabled (really simple to do, just disable JavaScript in the browser), then upload a custom HTML without those filters.
So: the best thing to do is to customize the safe_html transform with the same permission checking. The simple way to add new stuff here withouy monkey-patching is to register a new plone.outputfilters adapter as described here: https://pypi.python.org/pypi/plone.outputfilters#adding-a-custom-filter
Simply patching safe_html will not work for several reasons:
html is not only filtered on save but also on display. That means that admins would see your iframe but normal users would not.
The filter is only executed once at the first display and then cached for one hour. Adding code that distinguishes between roles would have no effect on the second visitor.

Sharepoint includes control template twice

I'm working on a SharePoint 2010 project. We have a usercontrol to include all of our custom javascript. I popped an alert in there whilst debugging something else, and lo and behold the alert was called twice. I checked and the file in question is included by only one Elements.xml file in one feature. So how can this be? I've tried searching the whole solution, and I only get one hit, so I must be missing something.
EDIT:
This is the code calling the User Control:
<Control Id="AdditionalPageHead" Sequence="10" ControlSrc="/_controltemplates/company/UCLoadJS.ascx" />
This code is found in the Elements.xml of the MasterPages folder, which deploys our custom master page.
Having searched the whole project for UCLoadJS, I cannot find another instance.
I think you have hidden WPs loading these Controls.
Try creating a new page and add the Visual WP once and try again
I know that this question is 9 years old but I just had the same problem, so in case someone stumble across this thread, maybe this will help you:
try to list all your delegate controls. you can slightly modify the script provided by Waldek Mastykarz : Checking which Delegate Controls are activated on your site
if you find duplicated controls (and that was the situation in my case) then its probably because you deployed your control using one feature scope (Site for example) and then redeployed with another one (Web). Follow the steps below to solve the problem:
1). switch to another feature scope (the one you no longer want to use)
2). deploy the feature
3). deactivate it
4). switch feature scope to the required one and redeploy it
Source: SharePoint delegate control is rendered twice

How to secure content in Orchard CMS

I'd like to use the roles and membership ability of Orchard CMS to limit access to a staff portal in Orchard CMS. At present there doesn't look like there's an out of the box way to do it.
I've found numerous references to modules that should be able to help out but none seem to work.
Very Simple Permissions is a codeplex item suggested by some that has a dead link nowadays and doesn't seem to exist on codeplex.
Science Project: Quanta destroys my site everytime I try to install it with a missing dll issue, and not sure if its what I need anyways.
Does anyone have any guidance as to how to either: show/hide menu items based on roles using the standard menu system or advanced menu plugin
or
limit content visibility based on roles. If its a module fantastic, otherwise don't mind getting my hands dirty with some coding but a point in the right way to do this mvc style would be great. I'm going to presume I need to edit the controller for the menu module to check for current membership and adjust the view data accordingly. I'm moving away from webforms. slowly. Still getting my head around the framework.
Thanks for checking in.
For those who are still struggling with this, there's a module is called ContentPermissions which is available here:
gallery.orchardproject.net/List/Modules/Orchard.Module.Orchard.ContentPermissions
Once installed, you can then add the ContentPermissionsPart to the Content Type you want to secure.
Quanta really is what you want. You are probably missing one of its dependencies. Pete, the author, is also super-active on the CodePlex forums so if you ask there, you'll get an answer.
UPDATE: Orchard 1.5.1, the current version as I'm writing this update, supports content item permissions and menu trimming out of the box.

How do I implement user theme switching in SharePoint?

My customer wants to provide 2 themes for a SharePoint application. Is there a strategy to accomplish this in MOSS 2007?
We want to apply user profile-based theme selection, and maybe even a drop-down to switch modes.
I don't know how extensive you want your re-theming to be. However if it could be CSS-only you could use this approach:
Store the CSS files for the different themes in the Style Library.
Create a list that stores the user and their chosen theme.
Write a feature and custom application page to allow the user to change their theme.
Write a control that does a lookup on the list against the current user and obtains the a reference to the corresponding CSS file in the Style Library. The control would then output the CssRegistration and CssLink controls to the page for this file.
Add this control to the master page so it executes on every page (caching should be added).
I can't see why this wouldn't be supportable by Microsoft as you're only changing CSS.
If you need to do more than that then another option is to write an HTTP module that changes the HTML output. Or of course JavaScript. With these two options you may have supportability issues (it depends on how extensive your changes are).
There is also SPThemes now available on Codeplex from Bjørn Furuknap. Users can choose their own themes and they can be applied at different scopes.
Here are the options that I’ve come up with from research and feedback. Both of which seem mostly infeasible.
Implement major UI layout changes in JavaScript. This would lead to client slowdowns, would be difficult to code, and would be completely unsupported by Microsoft due to the need to reference SharePoint objects that may change with subsequent SharePoint patches.
Provide two parallel themed sites based on the same data, and provide a way to switch between them. This would require that we deploy each site to multiple locations, and would require retooling of any site creation mechanisms in code (since they'd need to target two sites instead of one).
One another thing you can try is to use the Theme Changer and ThemeChangerStaple from codeplex , That is implemented as feature you can use the same code logic to archive what you want with bit of modification, give it as an option for the user using CustomAction.

Resources