Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#49 2005-05-28 12:36:33

rdtietjen
Archived Plugin Author
Registered: 2005-03-04
Posts: 31
Website

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

> icubyx wrote:
> I have installed my txp RC3 in a subdirectory and can’t get the sections to display. The paths always go to:
> //localhost/section
> and not
> //localhost/subdir/section

I do have an RC3 test site running in a subdirectory successfully.

> I tried placing the $pfr=hu at the begining, but it doesn’t help.

hu provides the absolute path so that should blast the problem to pieces.

therefore i think you have another, deeper problem. does everything else work right? does admin -> site diagnostics pass? have/can you run setup.php in your current location?
you must rerun setup if you move TXP into a subdirectory to make it recalculate path_to_site in txp_prefs table.

> on manually entering the correct url, the section shows correctly! :(

is this problem site net-visible so I could take a look at its behavior?


TV? Buglight for humans.

Offline

#50 2005-05-29 02:52:46

icubyx
Member
From: India
Registered: 2004-12-16
Posts: 21

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

Hi.
No its not net visible yet. The site is running on my local server (XAMPP). It passes the diagnostics with flying colours. This is a fresh install in a subdirectory…

I don’t get this problem while using “txp:section_list”. However, other plugins for navigation (ako_nav, mdp_sectionmenu, rdt_dynamenus) give me this problem.

When I enter the correct url means enter //localhost/subdir/section instead of the automatically returned //localhost/which gives me the page with the correct section highlighted in the ul.

The behaviour is:

click on view site -> //localhost/txp (displays correctly)
click on ‘about’ -> //localhost/about (Not Found with the error message below)

————404 Not found-The requested URL /about/ was not found on this server.
Apache/2.0.52 (Win32) mod_ssl/2.0.52 OpenSSL/0.9.7c PHP/5.0.3RC2-dev Server at localhost Port 80—————


only change is constant

Offline

#51 2005-05-29 22:33:30

rdtietjen
Archived Plugin Author
Registered: 2005-03-04
Posts: 31
Website

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

> icubyx wrote:

> Hi.
No its not net visible yet. The site is running on my local server (XAMPP). It passes the diagnostics with flying colours. This is a fresh install in a subdirectory…

i can’t explain it. try setting $pfr explicitly to your subdirectory, “/subdir/”


TV? Buglight for humans.

Offline

#52 2005-05-31 05:06:02

icubyx
Member
From: India
Registered: 2004-12-16
Posts: 21

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

Now things are getting really funny. I tried doing as suggested, but nothing helps. When I used RC1, it showed the sections correctly, but didn’t highlight the current one, now it highlights the current one, but doesn’t go to the right section. :((
Never mind. I’m moving TXP to the root directory…Hopefully things will sort themselves out with 1.0 final?
BTW, anybody else has had this weird problem?
Thanks for your help rdt. It is a great plugin I will enjoy using.


only change is constant

Offline

#53 2005-05-31 06:42:12

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

I have found the plugin to work perfectly well,highlighting works,sections show up correctly.I don’t know about subdirectory though

regards, marios


⌃ ⇧ < ⌃ ⇧ >

Offline

#54 2005-06-01 04:21:47

icubyx
Member
From: India
Registered: 2004-12-16
Posts: 21

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

Hi all,

The plug-in finally worked without having to move TXP out of the subdirectory. Here’s what I did:

Replaced $pfr with ‘/txp/’ in the $linkref statement. /txp is where my installation resides. Here are a few observations from the experiments:

Replacing $pfr with ‘/txp/’ in $linkref statement worked. (‘/txp/’ can be ‘/your subdirectory/’)

Declaring $pfr = hu AFTER “global $s, $pfr; $out = array();” lines in “rdt_function_menu” part of the plugin worked.

Delcaring $pfr = hu at the beginning of the entire plugin did not work.

Nor did replacing $pfr with hu in all occurences.

Last edited by icubyx (2005-06-01 04:24:33)


only change is constant

Offline

#55 2005-06-04 13:00:57

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,726
Website

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

icubyx,

The path from site problem arose in the transition from RC1 to RC3. In RC3 $pfr is deprecated but still present so that plugins don’t stumble, but the option to enter $pfr has disappeared from the RC3 admin.
The line <code>$pfr = hu;</code> must appear at the top of the function but AFTER the global …; statement or else the global statement will set it back to what it is/was before. Basically the added line says whereever $pfr is specified, ignore the global relative path and use the absolute link in its place. It’s a not particularly neat hack and AFAIK not RC1 compatible.

The disadvantage of using /your subdirectory/ means you have to change the plug-in for each and every install you have.
Replacing $pfr with hu in all occurences should also work, because that’s what the other statement does – chances are, you probably have a typing error in there somewhere. The ; and .‘s are all important and hu has no $ in front of it.

You say you’re using XAMPP. If you’re using subdirectories to keep your txp installs separate from one another, then I suggest you check the second part of the textbook WIKI, the bit about virtual host containers. For a long while I had different txp installs in different subdirectories of htdocs so I could work on several at once. Every time I uploaded the development version online I had to correct paths in my database to get correct the no longer needed subdirectory. Now I use the virtual containers as described in the instructions and each txp install can reside elsewhere in its own root directory on my hard disk and transferring the DB online no longer results in a whole load of path corrections. You now only need subdirectories if the txp install should be installed online on a subdirectory.


TXP Builders – finely-crafted code, design and txp

Online

#56 2005-06-10 05:13:16

icubyx
Member
From: India
Registered: 2004-12-16
Posts: 21

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

Thanks Jakob for the pointer. I am currently pottering around with different CMSes to see which one suits my way of thinking best. And since the server’s on my local machine, I just go to htdocs and change things around (not a good way to do things I guess)…hence the need to use subdirectories. But the way you suggest is something I definitely want to try. Looks simple.


only change is constant

Offline

#57 2005-07-01 20:38:37

squamosity
New Member
Registered: 2005-07-01
Posts: 2

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

Richard

Thanks so much for you incredible plugin. I love It!

I’m trying to stretch it a little but my php knowledge is fairly limited.

I’d basically like to add an additional function to extend your plugin to return categories. (I know it was discussed and discarded, but I grok 3 level navs and want to pull them in. ) It is half working but I’ve reached my limit of understanding of both php and textpattern to repair it all the way. Any chance you can take a look?

Thanks,

this is where I’m working on it:

http://www.one80studios.com/client/ava/news/

Offline

#58 2005-07-02 13:13:22

rdtietjen
Archived Plugin Author
Registered: 2005-03-04
Posts: 31
Website

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

> squamosity wrote:
> Richard
> Thanks so much for you incredible plugin. I love It!

> I’m trying to stretch it a little but my php knowledge is fairly limited.

> I’d basically like to add an additional function to extend your plugin to return categories. (I know it was discussed and discarded, but I grok 3 level navs and want to pull them in. ) It is half working but I’ve reached my limit of understanding of both php and textpattern to repair it all the way. Any chance you can take a look?

as before, I don’t have the category itch.

some suggestions for you:

It would help if you dummied up example HTML that you want to generate.

Find plugins that do something like what you want, steal from them.

First you do a query to build $categories, but then ignore that and use getTree to build $categorlist. Also, your code mentions getTree; where does that come from?


TV? Buglight for humans.

Offline

#59 2005-07-15 01:47:35

Vitruvius
Plugin Author
Registered: 2004-09-21
Posts: 125

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

I have been using this plugin (0.6) happily but am now getting an error on RC3 v496:

<code>Notice: Undefined variable: pfr in /home/usr/public_html/textpattern/lib/txplib_misc.php(379) : eval()’d code on line 8</code>

Any ideas?

Last edited by Vitruvius (2005-07-15 01:48:03)

Offline

#60 2005-07-15 01:59:31

Vitruvius
Plugin Author
Registered: 2004-09-21
Posts: 125

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

OK – I can get rid of the error by commenting out the line:

<code>$pfr = $pfr ? $pfr : hu;</code>

Haven’t been following the thread above – but maybe this was expected?

SH

Offline

Board footer

Powered by FluxBB