Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP
Vitruvius, thank you for sharing your version, it may help someone, and I will look into the option of updating the plugin if it appears necessary.
Plugin Composer — admin plugin to write your own plugins
Offline
Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP
Yura,
I had missed this one. You’re doing some good work man.
:)
Matthew
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP
Alright Yura, I think I’m getting this a bit, but still don’t have it working the way I want it to. Just a little help should get me to the right place.
I have http://zollinhofer.com working correctly. I also have http://zollinhofer.com/math displaying the way I want it to (the math page is it’s own separate page template in TXP. I want to be able to go to http://math.zollinhofer.com and for it to show http://zollinhofer.com/math. How do I go about doing that?
I guess I don’t know how to have a conditional statement show an entire page.
<code><txp:ied_if_domain domain=“math.zollinhofer.com”>
show the entire math page here
<txp:else />
show the entire nomal http://zollinhofer.com/index.php here
</txp:ied_if_domain></code>
I don’t know how to do that correctly with txp code.
Any help is appreciated.<br /><br />-Brian<br />——————-<br /><a href=“http://zollinhofer.com”>Zollinhofer.com</a>
“It is better to keep your mouth closed and let people think you are a fool than to open it and remove all doubt.”
- Mark Twain
Offline
Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP
Good task, Brian.
To answer the question you should first answer another one – How do you put contents of a section to the front page? I guess with the help of txp:article_custom. Then you design your front page design with the help of the conditional, which will populate the contents of your section on math.zollinhofer.com, or txp:else whatever you choose to be on your main domain.
Since a page template is the maximum level where you can put a conditional (or any other tag at all), you can’t put into condition page template itself. You will have to copy the contents of your math section’s page template into the conditional so that one template or the other shows up depending on what domain is called. (a possible solution could also be a query to the database to insert the content of the other page template, not having copy it – it’s a space where the plugin can be improved – to include the tag that would do that.)
Good luck, and have fun!
Plugin Composer — admin plugin to write your own plugins
Offline
Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP
Beautiful! It works just as I thought it should. Thanks for your bits of help. The txp:article_custom is a very helpful piece of this puzzle for me. Thanks!
You can see it at work at http://zollinhofer.com and http://math.zollinhofer.com.
<br /><br />-Brian<br />——————-<br /><a href=“http://zollinhofer.com”>Zollinhofer.com</a>
“It is better to keep your mouth closed and let people think you are a fool than to open it and remove all doubt.”
- Mark Twain
Offline
Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP
Does anyone know how to hack (or a plugin to fix) the permalinks that are output so they apply to a specific sub domain?
Example of what’s happening right now: looking at article at http://ia.mydomain.com → Click on permlink’d title → Get shunted over to http://mydomain.com/ia/article-title
Example of what I’d like to happen: looking at article at http://ia.mydomain.com → Click on permlink’d title → Get taken to full article view at http://ia.mydomain.com/article-title
I spent an hour or so trawling the textpattern source and only managed to figure out how to do it on the deprecated version. I’m not sure how they’re doing it in 4.0.3.
Offline
Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP
Invent your own permlink.
Use
<txp:php>echo $GLOBALS['thisarticle']['section'];</txp:php>
<txp:php>echo $GLOBALS['thisarticle']['permlink'];</txp:php>
or whatever you may need. Use reference @focusontheclouds or @rise.lewander.com
Plugin Composer — admin plugin to write your own plugins
Offline
Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP
ah, excellent.
thanks.
Offline
Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP
Okay, I got this bad boy to work (thanks so much, it’s great)!
I did apply a favicon to the head, but it only shows up on http://www.zollinhofer.com, not http://math.zollinhofer.com. Am I doing something wrong, or do I need to change anything? I did not put it in an ied_if_domain statement…
“It is better to keep your mouth closed and let people think you are a fool than to open it and remove all doubt.”
- Mark Twain
Offline
Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP
See how you are addressing your favicon ;) Same problem as above
Plugin Composer — admin plugin to write your own plugins
Offline
Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP
smacks self in head…
Thanks.
“It is better to keep your mouth closed and let people think you are a fool than to open it and remove all doubt.”
- Mark Twain
Offline
Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP
Yura, this is just superb! Thanks so much for this, you’ve sorted a big headache I was about to have!
Cheers,
Jon VC#9
Offline
#28 2006-11-02 20:15:19
- Nikolaos
- New Member
- Registered: 2006-11-02
- Posts: 7
Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP
Dear Yura
I would like to salute you and congratulate you for your marvelous plugins!!
I am getting these warnings in my sub-domain:
Warning: main(): open_basedir restriction in effect. File(/home/fhlinux185/m/markoulakispublications.org.uk/user/htdocs/main/textpattern/publish.php) is not within the allowed path(s): (/tmp:/usr/share/pear:/home/fhlinux183/j/journaloflaconianstudies.markoulakispublications.org.uk/user) in /home/fhlinux183/j/journaloflaconianstudies.markoulakispublications.org.uk/user/htdocs/index.php on line 33
Warning: main(/home/fhlinux185/m/markoulakispublications.org.uk/user/htdocs/main/textpattern/publish.php): failed to open stream: Operation not permitted in /home/fhlinux183/j/journaloflaconianstudies.markoulakispublications.org.uk/user/htdocs/index.php on line 33
Warning: main(): open_basedir restriction in effect. File(/home/fhlinux185/m/markoulakispublications.org.uk/user/htdocs/main/textpattern/publish.php) is not within the allowed path(s): (/tmp:/usr/share/pear:/home/fhlinux183/j/journaloflaconianstudies.markoulakispublications.org.uk/user) in /home/fhlinux183/j/journaloflaconianstudies.markoulakispublications.org.uk/user/htdocs/index.php on line 33
Warning: main(/home/fhlinux185/m/markoulakispublications.org.uk/user/htdocs/main/textpattern/publish.php): failed to open stream: Operation not permitted in /home/fhlinux183/j/journaloflaconianstudies.markoulakispublications.org.uk/user/htdocs/index.php on line 33
Warning: main(): Failed opening ‘/home/fhlinux185/m/markoulakispublications.org.uk/user/htdocs/main/textpattern/publish.php’ for inclusion (include_path=’.:/usr/share/pear’) in /home/fhlinux183/j/journaloflaconianstudies.markoulakispublications.org.uk/user/htdocs/index.php on line 33
Fatal error: Call to undefined function: textpattern() in /home/fhlinux183/j/journaloflaconianstudies.markoulakispublications.org.uk/user/htdocs/index.php on line 34
Is this a problem with my database? Just to know what I am going to tell them…
Offline
Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP
Alright, I just switched to the newest version of TXP as well as changing web hosting. When I did this, part of my site doesn’t work any more.
http://www.zollinhofer.com (works fine)
http://math.zollinhofer.com (works almost fine)
The two pages load the way they should. It is actually 1 php page that is divided by an ied_if_domain tag into two domains. The problem is when you click an internal link on the right side of the page on the blue site (math.zollinhofer.com). If you click on one of the “Recent Assignments” you get an internal server error. What did I do wrong? This used to work, but something broke in the 2 moves…
“It is better to keep your mouth closed and let people think you are a fool than to open it and remove all doubt.”
- Mark Twain
Offline
Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP
Nevermind. I forgot to reinstall the subdomain 3 main things… I got it.
“It is better to keep your mouth closed and let people think you are a fool than to open it and remove all doubt.”
- Mark Twain
Offline