Liferay distinguish between public and internal pages and hide/show them as needed - open-source

Situation
I want to create a Community-like Website/Portal with Liferay's Open Source Portal Software.
My issue right now is, I don't know how to realize a separated or partly divided site. It should be possible to have some pages before the login, to inform the possible future user and then after registration/login some internal pages which obviously shouldn't be visible to not registered users. The internal part is not much the problem, because I can just set the user permissions for the sites, so the "guest" users can not see them. But if I create pages for public guests, they also appear internally when logged in. But these ones should not be seen in the menu, but if I set the settings "hide page from navigation bar" they are also gone for the public area obviously.
Also I thought about organizing my site, it is anyways better to have it a bit structured so the internal part is separated from the outside part.
Possible Solutions
First I tried with the public and private pages, but unfortunately I came to no success. Maybe it is possible but if, then I did something wrong with them.
Another approach I have in mind would be using user roles/permissions, but I have not figured out how it could be done in an efficient way and I am also quite unsure if it is a good way how to achieve that. The problem is that every user inherits the permissions from "guest" so I cannot hide pages from them. I mean it would be enough to not have it on the internal navigation.
My last and maybe closest approach which could work, would be the community/organization mechanism, but unfortunately I couldn't find much information on that how one could achieve what I want to have.
I would be really glad if someone could help me with that?
New Approaches
What I would want to have is a "flag"/checkbox or something like "Hide Menu Button"(Internally/Externally -> Logged in user etc...), which I can check, what would cause the link to disappear.
I was thinking about maybe there could be a CSS style solution? Are there attributes in the navbar links of the pages which I could address and hide the links via CSS/jQuery? Like a "private" or "public" attribute or something?

The best way of doing it is using -
Public and Private pages. Public pages are visible to guest users and private only to members. In order for this to work you will have to code your theme accordingly.
Public pages will be still accessible to logged in users but you can hide them from the menu.
Tina

Looks like you want to hide 'public pages of a site' from internal users. Achieving this through permissions would be very difficult, if not impossible. You may want to try coding this logic in your theme's navigation.vm.
OR
If you still want to achieve this using Liferay configuration, try following steps:
Find your site from Control panel > Sites
Click "Manage Pages"
Do the following for each page under "Public pages"
Click on 'Permissions'
Remove 'View' permission for 'Site Member' role
I haven't tried this myself, but it should work.

I played around a bit and found a better pleasing solution now (better than hardcode something or change themes or anything).
I created two sites (not pages), where one has the "open" membership type and one the "private" membership type.
In the "open" site I create pages now which are for the public and not logged in user, so they are visible before the login.
The "private" site represents the "intern life" of the page, so I create the pages which only should be visible to logged in/registered users.
Now I create a site link/default landing page in the "open" site to the "private" site.
There are then only the internal sites visible for the users.
Don't mix that solution up with "public"/"private" pages, because these are working a bit different.
I like that solution way better, because then I can split concerns between the outer and inner "world".
If someone has an even better way of doing that, I would be glad to hear that :)
Until then, I hope maybe I could also help others with that.

Related

DokuWiki clicking on link displays FORBIDDEN page

I have searched the Forums and elsewhere for an answer... I'll keep researching but hoping that someone has run into this before...
I am using the latest download version of the “Closed” DokuWiki. I am building a Knowledgebase of forms and processes. I created a Start page and Menu page for all users to view, anything beyond that requires a login.
As admin, I can see all images and have access to all links. Click the link, the forms displays perfectly. (So no issue with capital letters or spaces).
However, when I login as a User, I can access all of the pages and see all of the text, but when I click on a link, the same Form as admin, instead of the form displaying in a new page, a new page is displayed with the word “Forbidden”.
So, I'm fairly sure it's an ACL issue. For example, I have the page “Office Administration” available to all Users. Do I need to somehow create a namespace or new page for all of the links, then give permission again? I was hoping that by making the page accessible to all users, this would also allow them the click on all of the links on that page as well??
How do I make the links accessible to all users? Image links are displayed to admin only. Not even registered users can view the images... text is fine... images show as broken links.
Appreciate any help you can offer! I have only been using DokuWiki for a couple of weeks but I am very happy with the results for far!
It was definitely an ACL (Access Control List) issue... so many settings...
I changed the Root* access to Upload and set the Start and Menu pages to Read only. From here on out it's setting permissions per user. whoo-hoo!

Redirecting Posts on Tumblr to Custom Pages

Now before you post one of the many "Add a Page" tutorials I've read, I'm going to say that none of those have helped because not only has Tumblr removed the "Redirect" option on it (courtesy of April 8th, 2015, unfortunately), but the add a page feature does not seem to work when using a custom HTML code--even when you use the "add a page" link that you created and paste it into the link url section provided for the tabs!
Of course, I have also looked at questions on here, but those pertain to loops leading back to the Home page, and do not specify how to have your posts redirected to a specific page. Believe me, I have tried the whole /tagged/yourname URLS under the URL section for the Link, but that is ineffective. I have even tried giving the post a Custom URL and then pasting that URL into the designated link URL section to see if it would pop up under the page but alas, that did not work either. And yes, I've even scoured through the code to find a possible paste solution and have pasted the link into the code directly, but that didn't change anything either as it was just under the "naming" section in the beginning of the code, anyways (should've known that wouldn't work).
If anyone can help me with this issue, or at least understand what I'm even asking, I would be forever grateful.
EFFORT FURTHER EXPLAINED:
Note: the tumblr's /submit URL works, but my attempts on, for eg, a separate art page for posts tagged "somethingart" have been fails.
Redirect: Here's an example of one of the many tutorials I read that has a clear image of where the "redirect" option should be, but of course it's outdated as the edit appearance looks slightly different from that now (you have to scroll down a little).
Okay, so let's move on to the other attempts now although, unfortunately, you're going to have to view them on a google document because apparently, you need to have 10+ reputation to post more than two links (click the link above)!
As for the coding part, well I'm actually a beginner at coding as I've only had two classes last semester (which was a while ago), and that was in C# and the foundations of computer science, so scouring through this code to try and find where I could add something to make it work only gave me a headache in the end (it's really long...).
I think I get you now. As a new account some features are not yet available to you. You will get those features eventually. For now (from what you have in the pictures):
The link (link6 URL) went to home page (or to the error page) most probably because you did not have http:// in the beginning. I said that by assuming how your theme is made based on the picture of 'Theme Options'.
After that is solved, you know the page would not redirect itself to your "tagged/something" page because it is not a "Redirect" page, and you do not have any script to do the redirection (if you do not actually).
Do not worry though, there is a better way; just have the "tagged/something" link directly in your "Link6 URL" option (as in the pictures). You have to put it something like; http://yourblog.tumblr.com/tagged/something.
Let me know if you have any questions?

Mediawiki - Automatic two-way links between page sections

I want my MediaWiki install to have two classes of pages. (In the users' eyes - the wiki won't have to know the difference.)
I want some pages to be on topics, and others on sources (name of book, video, etc.)
I want to have a topic page "FAA Licenses" like:
==Medical Certificates==
===3rd Class===
Required for student license, and before student solo flights. {{{link/reference/whatever generally around here to Jeppesen Book#pg27-28}}}
And a source page "Jeppesen Book" like:
==pg27-28==
{{{link to FAA Licenses#3rd Class}}}
These source pages will track the source's (book or video) content. I imagine a source page for a book to have page numbers, and for a video to have start and stop times, or section numbers. (The book or video itself won't be on the source pages.)
So, the source pages will really serve two purposes. First, it will be fairly easy to see which parts of the sources have had notes taken and put into the topic pages. (So non-linear note-taking of sources will be easy -- skipping from source to source on topics, rather than digesting an entire source at once.) Second, it will be easy from a topic page to see where to go back to for a more in-depth review.
There's two issues I'm writing about.
(1) I want the workflow to be the user edits the topic page, putting in links to source pages and sections. I want this one user-addition to automatically make the source page link back to this spot. I want the system to handle the two-way-linking, assuming the user won't be perfect.
(2) I want the user to be able to put links in the topic page to source pages and sections that might not exist yet. I'd need those links to show up as red, to indicate they need to be created. But, still, once created, I want the system to handle the two-way-linking, even if there were multiple red links to the same area. (I could see building up quite a few red links, then having an unorganized "purge" of them by creating the missing pages and sections, and don't want to have to search for all the links to the new areas.) Ideally, I'd love for these source pages to be auto-generated -- so pages and sections were made as links were made to them, and automatically deleted (or at least the backlinks removed) as links were removed to them.
I don't think the MediaWiki what links here functionality does the job. I want this to work on a per-section rather than per-page basis. And, I don't want the user to have to add to each section a "what links here tag" -- I want it to be automatic.
The extension Semantic MediaWiki will allow you to get bidirectional linking in a semi-automatic fassion.
https://www.semantic-mediawiki.org/wiki/Help:Link_Template
shows a high level example.
If you dig deeper into SMW and SemanticForms you'll find how with e.g. SemanticForms you can get a user experience that is close to what you are asking for.
See e.g. http://smw.referata.com/wiki/Discourse_DB and http://www.discoursedb.org/wiki/Main_Page for an application of these principles.
I don't think there is an easy way to do that. You could write an extension that provides a parser function that your users can enter, save the source page + source section + target page + target section in a database at links update, then use the ParserSectionCreate hook to show links based on that. Or you can create two types of templates and write a bot that keeps them in sync.

How to add Navlinks (or article path) in Mediawiki?

I have installed mediawiki 1.21. I am wondering how you can add navlinks (meaning the path to the page. Not sure if I am using the right work to describe it) at the top similar to the way it is in wikihow website? Below is an image so you know what I am referring to.. I find this to be very useful so users can understand where they are when reading an article.
I have created a custom skin and I have a Navlink DIV at the top where I would to show the path to that page there like: wiki -> xyz Category -> Article Name. I have semantic extension installed. Can this be achieved with that? Or is there another way to do it? How can I add the code directly in my skin.php file so this navlink is generated and listed depending on what page the user is on?
Terminology
This kind of feature is called a breadcrumb.
Has MediaWiki already this kind of feature?
Yes, for subpages.
A subpage is a page intitulated Quux/Foo/Bar in a namespace with the subpage feature enabled. By default, this is the User namespace for example, but not the main one (For example, on Wikipedia projects, we want to be able to use titles like AC/DC).
In this situation, a breadcrumb Quux > Foo will be printed.
This doesn't solve your issue, as you want to use categories, but it allows you if you write your custom code to know there already is some code somewhere doing that :)
Breadcrumbs extensions
Some extensions have been developed to solve this particular issue:
BreadCrumbs2
CategoryBreadcrumb
The first is more exhaustive and gives you more flexibility, the second simpler and so a good starting point to write a custom stuff.

How to embed/integrate WordPress blog into my own web site?

I have a WordPress blog account already (abc.wordpress.com). And I have my own web site: www.xyz.com
I would like to integrate my WordPress blog content into my own site. Hopefully something like blog.xyz.com or just replace the home page of xyz.com with abc.wordpress.com
I know that I can download WordPress' code from wordpress.org and run my own WordPress. And having my own MySQL database, but WordPress is always releasing new code. I don't have the time to keep updating the source on my end to match it.
I'm running my own site as a hobby, so I prefer to let WordPress.com to manage the content for me and continue reuse my own blog at abc.wordpress.com, but make the content show up in my own site: xyz.com
I hope I was clear when explaining this.
Anyone knows a way to do this?
Thanks.
If your main worry is about the updates, I would say don't be. A simple click of the 'Updates' button in the wordpress admin is all you need to do in order to apply the updates for wordpress. A notification will pop up alerting you of any updates.
And as Calle has already mentioned, you can retrieve your content via RSS, or you could just export your current content from Wordpress.com, import the content into your own site, and manage it there. Everything would be in one spot.
Good Luck.
I don't know how good you are with programming but there's a PHP library called Simple Pie which would help you retrieve your content via RSS (which Wordpress automatically generates for you). The adress is here: http://simplepie.org/
If you are not very good with programming, perhaps you can get someone to do it for you or find a script which is already written somewhere. I do think RSS is definitely the best way to go.
I also think you exaggerate the problems of hosting Wordpress yourself. It's not something that you have to keep updated with, and if you want to, all you have to do is log in from time to time, perhaps once a month (how often are you writing articles?), and click "update" and Wordpress will do everything for you. Both for your plugins and WP version.
For the ability to use your own domain (xyz.com) and have wordpress redirect users from abc.wordpress.com(your wordpress blog) to your domain requires a premium account.
If you have a premium account then you can just log in to wordpress.com, click 'upgrades' and select 'domains'. From there you will see the option "Map an Existing Domain" and you will want to enter your domain here. Now your wordpress.com blog is what will show when users enter your domain's url (xyz.com).
Alternatively, if you need a workaround with a free wordpress.com account then you want to just embed your blog and for that you will need to use an RSS feed. Note: this method will not maintain your wordpress styles it will merely transport the content. Also by default not all browsers support RSS feeds.
You can view your blog's current feed by adding 'feed' to the end of your wordpress.com url, i.e. abc.wordpress.com/feed. You can read more about feeds here (http://en.support.wordpress.com/feeds/). Now you are just left with the task of figuring out how to embed the feed into your page.
One final hail-mary you might attempt is just redirecting your domain to your blog. Reference on how to do this different ways here: (http://css-tricks.com/redirect-web-page/). Example, place this tag in the section of your domains pages:
<meta http-equiv="refresh" content="0; URL='http://google.com'" />
(this will redirect after 0 seconds to the specified url)