if (!empty($_SERVER['HTTP_CLIENT_IP']))
$ip=$_SERVER['HTTP_CLIENT_IP'];
else if (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
else
$ip=$_SERVER['REMOTE_ADDR'];
?>
There already a lot of components in the ZK framework. In this blog post, I will introduce a new one that I have created: Accordion, a horizontal accordion component that is based on liteAccordion, a jQuery plug-in.
Accordion includes the following features:
Supports any ZK components as children
Supports all the native themes (basic, dark, light and stitch)
Cross-browser compatibility
Good look and feel
Downsized
Demo
Following is an example of how you can use the component:
As shown above, you can place any ZK component inside an accordionpanel. The Accordion component also supports the onSelect event, fired when you select an accordionpanel. Like in the demo, accordionpanel‘s child components can be added or removed dynamically as shown below:
// ac refers to the parent Accordion
// Dynamically add a new accordion panel
Accordionpanel p = new Accordionpanel();
p.setTitle("New Empty Panel");
ac.appendChild(p);
// Dynamically remove a selected accordion panel
Accordionpanel p = ac.getSelectedpanel();
if (p != null) {
ac.removeChild(p);
}
Download
You can download the component and the demo application here.
Hi, I liked this component and I’m tring to use in my project, so I’m new in Zkoss and I don’t know how to use. Can you help me? Can you say me how can I integrate in my project?
Thanks a lot!
Very nice
Nice!
Do you have any plans of making this compatible with zk 6 and to implement full flexibility to the widget?
Yes, please post a feature for this. – http://tracker.zkoss.org/secure/Dashboard.jspa
Thanks,
Jumper
Already added some days ago:
http://tracker.zkoss.org/browse/ZK-1325
Hi, I liked this component and I’m tring to use in my project, so I’m new in Zkoss and I don’t know how to use. Can you help me? Can you say me how can I integrate in my project?
Thanks a lot!
I can not make it work in zk 6.0.5. Does it work on this version?
I can not make it work in zk 6.5.0. Does it work on this version?
I also work with the 508 version, remains the message processing