Im sure this issue has come up before, but I cant seem to find an exact reference to it.
Basically I want to make sure that users submit nodes of a certain content type to the relevant subdomain, and nowhere else. I could use the subdomain module for this, but there are other features in DA that I need, plus it seems to better maintained/more active.
So if i have a content type called video for video files, I want users to add the node at http://video.mydomain.com/node/add/video, rather than:
http://mydomain.com/node/add/video
http://someothersubdomain.mydomain.com/node/add/video.
Of course I can manually put the correct links in a menu block, but users can still type in the wrong subdomains to circumvent it, and I cant seem to figure out a method to redirect users, because of redirection loops (mind you, I have no clue on redirects anyway)
So far I have installed Domain Node Type, to set nodes types to certain subdomains, and I have Domain Source as well. I want to install this patch > http://drupal.org/node/756372 which would mean those nodes would then have a permanent single source as well. Then I could simply block users from seeing any sort of domain selection dialog when they go to add a node.
BUT still, the problem is I want them to add the node on the correct page, somehow I need to find a way of redirecting them to the correct node/add/* page.
Again, im sorry if this has come up before...
Comments
Comment #1
agentrickardIs the permission below not sufficient?
Comment #2
Netbuddy commentedProblem is, say I assign users to both the root domain (which they are by default since they will register on that) and several subdomains (through the user defaults tab in DA), the content creation page always pushes the user back to the root domain, because, I imagine, it is the first match. What I really need is a way to force content types to be associated with subdomains, and strictly enforce content creation to be carried out on those subdomains only. Ive tested every combination of permissions and user defaults I can muster, and either the user is forced back to the root/default domain, or I can use "publish on any assigned domain", which means say a user is assigned the default, and the gallery subdomain, they could publish forum posts in the gallery subdomain, and I cant stop it.
From a user experience point of view, makes more sense for users to publish a video, on subdomain video.mysite, a picture, on subdomain gallery.mysite. Right now a solution would be to have a moderation process, which I had intended to do for everything other than forum and blog posts anyways, but if I could find a solution to this problem, it would alleviate some ongoing administration overhead.
Comment #3
agentrickardI would swear someone wrote a module for this. Have you searched the queue?
Comment #4
skizzo commenteddomain_nodetype maybe
Comment #5
Netbuddy commentedDomain nodetype allows you to assign the content type to a subdomain, but it doesnt force users to use that subdomain to create that content.
Comment #6
skizzo commentedif you have control over your Apache httpd, you may use mod_rewrite so that
/node/add/video is rewritten to video.mydomain.com/node/add/video
That should be foolproof...
Comment #7
agentrickardI would approach this as a patch to domain_nodetype. Moving.
Comment #8
Netbuddy commentedIn response #6 skizzo - How do you do that without creating an endless loop? Thats where im stuck.
Comment #9
skizzo commentedI agree with the feature request. Meanwhile, try adding a RewriteCond before the RewriteRule, excuding the destination path, so that it breaks the recursion.