How to test if a user is in a site context in Alfresco Share? - alfresco-share

I need to test if a user is within a site context or not to perform some action in share page views. How can I achieve this?

I ended up duplicating the search bar in the collaboration-navigation bar and with a sprinkle of javascripting, able to hide and display the Global search bar, when in sites.

Related

Hide few wordpress dashboard option from client

I have just developed a wordpress site for a client. The client wants full access but I dont want to give him access to all the work which I have done (plugins, techniques, themes options etc). How can I give a customized dashboard access to the client with hidden plugins and theme menu items.
Thanks
If you want GUI based approach and not want to handle it via functions, using the Members plugin could help
I think you would prefer to go with a plugin rather than pieces of code. You can achieve the same by using a plugin called Adminimize
Admins can activate/deactivate every part of the menu and even parts of the sub-menu. Meta fields can be administered separately for posts and pages. Certain parts of the write menu can be deactivated separately for admins or non-admins. The header of the backend is minimized and optimized to give you more space and the structure of the menu gets changed to make it more logical – this can all be done per user so each role and their resulting users can have his own settings.
I hope the above information worked for you.

let wordpress create new page with users content

I am wondering what would be the best way to let wordpress create idivual pages :
the project is as followed :
User makes account
Wordpress creates account and an account page, this page however is completely different from the wordpress theme. (easy i know, You could compare it with a profile page for the user but with much more content to fill in)
after user has filled in additional content wordpress should create the new page with the specific page design. Users should be able to edit content afterwards. Paying users should be able to export the generated page. Pages should be visible for public and be like domain.com/user
I am not sure how the best approach would be for this project as i am not that familiar with wordpress. My first thought is trough a childtheme, but im not sure if this would work.
Any advice?
Kind Regards
Try BuddyPress, this is exactly what it is designed for.

alter content administration page (admin/content)

I'm working on some drupal installation and googled the whole day, but I can't figure out an answer to the following question:
How is it possible to alter the admin/content page in a way that specific roles are only able to see or filter out limited content types?
Please notice that I don't want to restrict node access in general, I just want to make this page less confusing for editors with different roles and tasks.
I know there is the administration views module and there I can set filter fields in the way I want. The problem with this is that I'm not able to enter the views access restrictions and so all I can do is limit the view's content types for all roles.
Can somebody give me a hint how to solve this?
Thank you very much and sorry for bad english.
One way would be to make a custom module.
In this module you would create a page with hook_menu().
https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_menu/7
Then in the page callback function that you create you load global $user and switch between the $user->roles, out putting different HTML lists of links depending on their role. If you want something a little more dynamic you can always load the various content types with node_type_get_types().
Then go into structure -> menus -> navigation and disable the default link, replacing it with the new page you created.
If you aren't 100% clear on how to do a couple of these things comment here and I will update my answer.

Drupal arguments in a menu

By default on a page I have the following menu:
Profile /profile
Albums /album
Awards /awards
Going to any of those pages will load the page default.
If I go to a page on my site such as /mycontent/1 I wish to change a the menu to be the following.
Profile /profile/1
Albums /album/1
Awards /awards/1
I want to pass the argument (nid) to the menu. Is this possible?
Update
The selected answer does do what I asked. I however have changed how I am doing things to use Panels to display the content. I am then using some CSS and JavaScript to hide and show content. With views caching it seems to be working well.
Yes,use arg(0),arg(1), or arg(2) depending on which variable you want to use. It will use the path like the indexes of an array (0/1/2/3/4/etc...). Drupal will send you these variables as they were before the path was aliased if that is something that has been applied to it. Why are you passing the variable? There is probably a better way to do it the "Drupal" way..
Actually I am working on this same problem currently where I need to translate an aliased path: dept/profile/1 to load node/1223/profile/1 where 1 is the ID of the profile to show.
What I am using now is the URL Alter module and implementing the hook it gives to enable this feature. If you are interested in this maybe we can see if it is possible to get module out with a GUI.
My thread on this that is active now: Using module: url_alter and it's hook: hook_url_outbound_alter()
I am using a node that houses a panel which has a view inside it, for reasons that are site specific.

How to embed a node on homepage in Drupal 6?

How can I embed a node on the front page in Drupal 6. The node basically has the image upload field along with title and description. I want it to some how appear on the homepage alongwith a "views" which shows the uploaded images at the bottom.
What I want is to give the users an ability to create content which is right now available at .../node/photo/add. I want to somehow show this box which lets one create content i.e. upload photo with title and description on the homepage.
It's basically just an attempt at creating something like imageshack as an experiment.
I am pretty n00b when it comes to drupal so please be more descriptive.
Jukebox's solution works as a point-and-click method. If you want to do it with code, it's more like this:
create a glue module Handbook | Example Blog Post
turn it on in admin/build/modules
create a menu item using hook_menu() that will become the page
embed the node with node_view()
embed the view (blog post)
in admin/settings/site-information set your page to the
You can use the Node Blocks module to, well, turn your node into a block. This means that you can go to the /admin/build/block page and place your node in a particular region.
After installing the module, edit the Content Type of the node you want to turn into a block. Under Workflow Settings, Available As Block, choose Enable.
Now you can go to /admin/build/block and you can see some new blocks. Just choose the one you want and place it in the region of your choice. You can also configure that block's visibility settings from there as well.
If your planning on having a more complicated home page at any point in the future I'd highly recommend using Panels to do this. It will allow you to arrange your front page with views and nodes in a grid method.

Resources