Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2006-09-09 18:32:01

Inspired
Plugin Author
From: Kiev, Ukraine
Registered: 2005-01-28
Posts: 87
Website

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

#26 2006-09-09 18:33:46

brian.zollinhofer
Member
From: Virginia
Registered: 2006-07-10
Posts: 24
Website

Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP

smacks self in head…

Thanks.


Zollinhofer.com

“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

#27 2006-10-12 14:14:31

jonhicks
Member
From: Oxfordshire UK
Registered: 2004-03-22
Posts: 256
Website

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

#29 2007-02-15 15:26:13

brian.zollinhofer
Member
From: Virginia
Registered: 2006-07-10
Posts: 24
Website

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…


Zollinhofer.com

“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

#30 2007-02-16 01:17:27

brian.zollinhofer
Member
From: Virginia
Registered: 2006-07-10
Posts: 24
Website

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.


Zollinhofer.com

“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

#31 2007-03-21 01:22:14

visualpeople
Member
From: Corvallis, Oregon - USA
Registered: 2005-11-16
Posts: 73
Website

Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP

This is a great plugin!

I have a client who is certain that having seven domain names will solve all of her problems. So I’m wondering if there is there an easy way to compare multiple domains.

Something along the lines of:

<txp:ied_if_domain domain="www.url1.com" domain="www.url2.com" domain="www.url3.com">
Print this
<txp:else />
Print this one instead
</txp:ied_if_domain />

I tried this and thought it was working, but it doesn’t seem to be. I feel like I’m missing something obvious here…

Last edited by visualpeople (2007-03-21 01:26:24)

Offline

#32 2007-11-27 00:52:14

AlexStacey
Member
Registered: 2007-11-09
Posts: 22

Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP

nice plugin! thank you kindly =]

Offline

#33 2007-11-27 01:15:17

AlexStacey
Member
Registered: 2007-11-09
Posts: 22

Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP

now i’ve just got to work out how to fix the rss links for the other domain =]

Offline

#34 2007-11-27 02:53:31

AlexStacey
Member
Registered: 2007-11-09
Posts: 22

Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP

I have two subdomains both pointing to the same installation but I want them to display different content. This plugin works perfectly for this except that the The RSS / Atom links were showing the default domain for textpattern on both of the subdomains and I want them to each show their respective sections (with the right subdomain) This is far from elegant but it seems to be working ok and it might help someone. I botched these two lines into lib/txplib_db.php in the get_prefs() function…

note: change subdomain for your subdomain and mysite.com for your domain

function get_prefs()
    {
        $r = safe_rows_start('name, val', 'txp_prefs', 'prefs_id=1');
        if ($r) {
            while ($a = nextRow($r)) {
                $out[$a['name']] = $a['val'];
            }

            // subdomain hack*****************************
            $sd = 'subdomain';
            if ( $sd == substr($_SERVER['SERVER_NAME'], 0, strlen($sd)) ) 
                $out['siteurl'] = $sd . '.mysite.com';
            // end hack***********************************

            return $out;
        }
        return false;
    }

Offline

#35 2008-09-09 12:41:07

mikkeX
Archived Plugin Author
Registered: 2004-02-26
Posts: 74

Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP

Great plugin.
How do you hack so the comments permlink work as on it is on the subdomain?

Offline

#36 2009-02-24 18:16:15

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP

I’m trying to use sections to differentiate my different sub-domains.

So let’s say I have 3 sub-domains (each have different names)
  • mysite.com
  • example.com
  • sitename.com

I would then create 3 sections with the exact same names

  • mysite.com
  • example.com
  • sitename.com

Now for my question:
Is there a way to detect the current sub-domain and populate the section="" attribute of article_custom?

Example:
<txp:article_custom form="articles" section="$current-sub-domain.com" />


Tom

Last edited by renobird (2009-02-24 18:16:50)

Offline

Board footer

Powered by FluxBB