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

agentrickard’s picture

Is the permission below not sufficient?

  -- 'publish from assigned domain'
  Before being presented the editing form, users will be taken to the
  first domain assigned to their user account.  This function is most useful
  when you users are only allowed to enter content from a single domain.

  Note that for users who have more than one assigned domain, this option
  will take them to the first match and the user will not be allowed to
  change the domain affiliation.

  The advantage of this option is the user cannot modify the URL of a
  content edit form to match the URL of other domains, forcing all of her
  posts to be made to a single domain. Users trying to enter content
  from another domain will always be transferred to their assigned domain.

  In effect, a user assigned to 'one.example.com' will only be able to post
  to that domain, even if she clicks Create Content from two.example.com.
Netbuddy’s picture

Problem 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.

agentrickard’s picture

I would swear someone wrote a module for this. Have you searched the queue?

skizzo’s picture

Netbuddy’s picture

Domain nodetype allows you to assign the content type to a subdomain, but it doesnt force users to use that subdomain to create that content.

skizzo’s picture

if 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...

agentrickard’s picture

Project: Domain » Domain node type
Version: 6.x-2.x-dev » 6.x-1.x-dev
Component: User interface » Code
Category: support » feature

I would approach this as a patch to domain_nodetype. Moving.

Netbuddy’s picture

In response #6 skizzo - How do you do that without creating an endless loop? Thats where im stuck.

skizzo’s picture

I agree with the feature request. Meanwhile, try adding a RewriteCond before the RewriteRule, excuding the destination path, so that it breaks the recursion.