Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2007-11-13 11:31:57
- vanderkerkoff
- Member
- Registered: 2005-05-26
- Posts: 45
problem after upgrade to 4.0.5
Hello everyone
We’ve written a bit of code into the publish.php file in order to strip out the 3rd section of an url in order to pull data from a static xml file and display it, it looks like this.
function glam_title($u3) { if ($u3 != ‘’) { global $glam_id_no ; $glam_id_no = $u3 ; } }
it works fine in 4.0.2, but in 4.0.5 it’s not working.
Anybody got any ideas why?
Any help is as always greatly appreciated.
Offline
#2 2007-11-13 12:40:25
- vanderkerkoff
- Member
- Registered: 2005-05-26
- Posts: 45
Re: problem after upgrade to 4.0.5
ok, I’m reasonably certain that its not global that isn’t working, otherwise half the site would fall over :-)
when I’m reading the data from the xml file I think xpath is failing
$sxe = simplexml_load_file(“/www/htdocs/assets/xmlevents.xml”); foreach($sxe->xpath(‘//event[id = ‘.$testnum.’]’) as $item) {
That works fine in 4.0.2, but not in 4.0.5, can someone please give me a hand here, I was told be everyone that upgrading was really easy.
hmmm
Offline
#3 2007-11-13 13:26:03
- vanderkerkoff
- Member
- Registered: 2005-05-26
- Posts: 45
Re: problem after upgrade to 4.0.5
ahh, i think I can see what I’m doing wrong
on the download 4.0.5 page there’s a new xml-rpc out, so I’ve downloaded that and installed it.
I’m having trouble following the instruction though on this page
http://textpattern.com/download-rpc
Can anyone tell me what this means?
Configure your client
XML-RPC endpoint http://mysite.com/rpc/
User Your Textpattern user login
Password Your Textpattern user password
I have no idea what file to change, or if it’s not a file, or what the client is. Is the client textpattern?
Any help greatly appreciated.
Offline
Re: problem after upgrade to 4.0.5
Can anyone tell me what this means?
Detailed explanation about how to configure some desktop clients – as the link says, use those for you desctop XML-RPC API client.
But is XML-RPC what you’re after? Ain’t you wanting to show something on your webpage? As you said earlier:
in order to pull data from a static xml file and display it
function glam_title($u3) { if ($u3 != ‘’) { global $glam_id_no ; $glam_id_no = $u3 ; } }
What does that code do? Makes coffey? That ain’t saing nothing because it ain’t complete. Could you use just a simple plugin?
Cheers!
Last edited by Gocom (2007-11-13 14:03:26)
Offline
#5 2007-11-13 14:15:16
- vanderkerkoff
- Member
- Registered: 2005-05-26
- Posts: 45
Re: problem after upgrade to 4.0.5
Thanks for getting back to me GoCom
I found out what the problem was.
In 4.0.2 if the main article that was then passing the 3rd section of the URL to the XML call was set to sticky, it worked.
It didn’t in 4.0.5, so unstickying the article was all that needed to be done.
:-)
function glam_title($u3) { if ($u3 != ‘’) { global $glam_id_no ; $glam_id_no = $u3 ; } }
That function takes the vlaue of $u3 if it’s not blank and sets a global variable called $glam_id_no to be the value of $u3.
Thanks for replying.
Offline
Offline
Pages: 1