HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Keep theme on redirect after form submit

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#54766 (In Topic #11926)
Avatar

Fan in action

I like the way ocportal manage transparent redirects and maintains theme across zones. This gives a consistent look and feel while using modules from different zones. I have managed to make several sub community zones and given different themes to each.

But Im stuck at one place…. the forms or any links inside a redirected place maps back to the default theme assigned to that zone. Ok let me explain.

I have a zone called Seashell and it has its own theme. I have made a editprofile comcode page (seashell:editprofile) which redirects to PersonalZone:editprofile. It works fine, edit profile looks like it is part of Seashell zone.

Seashell:editprofile -> PersonalZone:editprofile

Now when the user submits the form, the page redirects to sites member profile page which has the Site's theme. I want to maintain the Seashell theme. How do I achieve that?

Before
http://localhost:8080/ocportal/Seashell/index.php?page=editprofile

After
http://localhost:8080/ocportal/site/index.php?page=members&type=view&id=4&redirected=1

Similarly I have to redirect user from Welcome:login page to Site:start after successful authentication.
Back to the top
 
Posted
Rating:
#54767
Avatar

Hi,

1st thing I should mention is there's no need to make a Comcode page if you want a redirect. You can redirect from where there's no equivalently named page.

I think you're using 4.1.13. This problem is already fixed in 4.2 RC3 and if there's another patch release of 4.1 it'll be fixed there also. I have attached the two files from our development copy of 4.1.x that I think contain the fix, but please make a backup first as I'm not 100% confident that this won't cause compatibility problems:
Attachment
» Download: site.php (57 Kb, 90 downloads so far)
Attachment
» Download: zones.php (29 Kb, 99 downloads so far)


Make sure you have a redirection for members in your Seashell zone too of course.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#54778
Avatar

Fan in action

I appreciate your quick reply. You are correct I'm using 4.1.13. Is 4.2 RC3 fit for production? In fact Ive already given several demos to my customer.

Anyways I took backup and replaced the two files. I did a diff and there are new lines of code. Cleared and rebuilt the cache. But didn't see any difference.

1st thing I should mention is there's no need to make a Comcode page if you want a redirect. You can redirect from where there's no equivalently named page.

I followed the tutorial in http://ocportal.com/docs/tut_subcom.htm I could only figure out that redirection can be done only from zone:page to anotherzone:page. When you said there's no need for making a Comcode page, I can't figure out how.


Make sure you have a redirection for members in your Seashell zone too of course.

Please guide me thru that, Im getting a bit confused.

Thanks.
Back to the top
 
Posted
Rating:
#54779
Avatar

When you said there's no need for making a Comcode page, I can't figure out how.

You can't figure out how there is no need? I'm saying there is no need, try it and you will see :).

If you want the members page to show with your seashell zone's theme then you have to set up a redirect so it will be able to run from the seashell zone. Otherwise ocPortal wil be forced to go to another zone that has it, site, which does not have the same theme.

Really this kind of stepping through should be done via our commercial support if you're asking me (ocProducts staff), especially as you're charging a client for it yourself. We need to get paid down the line.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#54812
Avatar

Fan in action

Sure I will try, if you say so then it is possible :)

And regarding support, I can understand the kind of effort you and your team have put… Im waiting to finish this project and after which I wish to contribute my time for ocportal by developing some wonderful themes, which will be different from default theme. You have my word for it  :thumbs:

Have you fixed any release date for v4.2?
Back to the top
 
Posted
Rating:
#54814
Avatar

Thanks :). Very very soon.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: