Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2008-01-06 13:10:07

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Almost finished..

Jukka,

I have this now in Live Search:

Header("content-type: application/x-javascript");
if (gps('file') == 'livesearch') {

Do you see if its fixed or not?

Offline

#26 2008-01-06 13:14:41

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Almost finished..

jstubbs wrote:

Do you see if its fixed or not?

Gocom wrote:

If you add top of it

Well you could understand that in both ways, but inside the conditional would be better ;)

Last edited by Gocom (2008-01-06 13:18:29)

Offline

#27 2008-01-06 13:23:32

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: Almost finished..

Regarding drop down menus, yours is very easy to do with plain css. More complicated ones are also easy with css too, so why complicate things with js, even if it’s only a little bit?

CSS Play has working examples plus the css you need.


BB6 Band My band
Gud One My blog

Offline

#28 2008-01-06 13:30:16

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Almost finished..

Let’s just do it your way Jukka – I will put the JS from Live Search into TXP using stm_javascript. If I take out all the JS from rss_live_search, I would now have this:

if (gps('file') == 'livesearch') {
global $pfr;
echo <<<EOF

EOF;
exit;
}

Between the EOF is where the JS was. Those lines look ok to you?

Offline

#29 2008-01-06 13:33:47

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Almost finished..

zero wrote:

Regarding drop down menus, yours is very easy to do with plain css. More complicated ones are also easy with css too, so why complicate things with js, even if it’s only a little bit?
CSS Play has working examples plus the css you need.

Hi Peter. Because I did not have much time to put it together and no site is ever finished – its always possible to go back and use a better solution. I think when I looked at CSS Play it was difficult to find one that worked well for me and that was relatively simple to use part section_list, part manual links. As I remember anyway.

You know of a good menu on CSS Play that I could use?

Last edited by jstubbs (2008-01-06 13:34:06)

Offline

#30 2008-01-06 13:44:38

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Almost finished..

Mmm. I get a parse error with Safari Web Inspector around line 124 of the new livesearch JS, served up by stm_javascript and called from the Head:

Lines are here:

liveSearchReq.open("GET", "
SyntaxError: Parse error (THE SYNTAX ERROR IS FROM SAFARI)
EOF;
echo $pfr;

Last edited by jstubbs (2008-01-06 13:44:54)

Offline

#31 2008-01-06 13:56:47

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Almost finished..

Mmm. I get a parse error with Safari Web Inspector around line 124 of the new livesearch JS, served up by stm_javascript and called from the Head:

You did copy little PHP alongside the JavaScript ;) did’ay. To avoid that, you could copy this instead: http://solborg.fhs.no/?file=livesearch Place it to the javascript file, and voila we have avoided the php.

PS. If that file’s code looks little messy, (some marks missing etc.) then look at it’s source code and it will look correct.

Cheers!

Last edited by Gocom (2008-01-06 13:59:24)

Offline

#32 2008-01-06 14:18:46

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Almost finished..

Gocom wrote:

You did copy little PHP alongside the JavaScript ;) did’ay. To avoid that, you could copy this instead: http://solborg.fhs.no/?file=livesearch Place it to the javascript file, and voila we have avoided the php.

Yeah I am a ****ing idiot. Duh.

Fixed now. Thanks Jukka. I replaced the original rss_live_search plugin, so whatever is in there is left as-is.

On to the next problem…!

Offline

#33 2008-01-06 14:22:08

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: Almost finished..

I think this drop down menu will suit you.

If you look at the source, you will find the css in the head and the menu you want starts at div class=“menu”


BB6 Band My band
Gud One My blog

Offline

#34 2008-01-06 14:43:45

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Almost finished..

Thanks Peter. I will bookmark the page and look to implementing a CSS only menu once I fix the JS validation errors, plus adjust some more things on the site.

Offline

#35 2008-01-06 23:23:16

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Almost finished..

Mmmm. Came across an interesting problem with the site, while changing the layout of one of the main sections of the site. See here

The first article on the left is the latest, followed by the next 3 below. Right side, 20 article offset by the previous 4.

Question is – what’s the best way to keep the same layout in an individual page? Offsets don’t work in individual pages it seems. Late here (early morning) and right now I don’t see the way, so any help would be gratefully received….!

Offline

#36 2008-01-07 00:05:15

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Almost finished..

re: dropdowns

Suckerfish dropdowns are cleaner code wise (plus you don’t have to wade through the page’s source code for the CSS). Just throw the IE JS into a conditional comment for IE<7, and you’re good to go!

For offsets, are you calling the offsets from the article form or page template?

Offline

Board footer

Powered by FluxBB