Ok.. There’s my take on this one.
To do so I have added one field namely “order” in the image data..
find this code in wp-cycle.php in the plugin directory..
$wp_cycle_images[$time] = array(
'id' => $time,
'file' => $file,
'file_url' => $url,
'thumbnail' => $thumbnail,
'thumbnail_url' => $thumbnail_url,
'image_links_to' => ''
);
and add here another line ‘Order’ => ” so that it become like ..
$wp_cycle_images[$time] = array(
'id' => $time,
'file' => $file,
'file_url' => $url,
'thumbnail' => $thumbnail,
'thumbnail_url' => $thumbnail_url,
'image_links_to' => '',
'Order' => ''
);
then we need to make it appear in the admin section .. so find the <thead> and <tfoot> section here..
and in the <tr> section of both of these <thead> and <tfoot> add a line
<th scope=”col”>Order</th> this will make it appear in the settings page.
Just below that </tbody> section you will find a form like <form method=”post” action=”options.php”>
now in this form add a <td> like
<td><input type="text" name="wp_cycle_images[<?php echo $image; ?>][order]" value="<?php echo $data['order']; ?>" size="35" /></td>
this .
Next we need to store this order value . therefore find a function there function wp_cycle_images_validate($input) {
add this code below the last line of the function.
if($value[‘order’])
$input[$key][‘order’] = wp_filter_nohtml_kses($value[‘order’]);
Now finally we need to modify the wp_cycle() function to our needs. So add some codes just below this(echo ‘<div id=”‘.$wp_cycle_settings[‘div’].'”>’.$newline; ) line in wp_cycle($args = array(), $content = null) function.
$sortArray = array();
foreach($wp_cycle_images as $imgs){
foreach($imgs as $key=>$value){
if(!isset($sortArray[$key])){
$sortArray[$key] = array();
}
$sortArray[$key][] = $value;
}
}
$orderby = "order";
array_multisort($sortArray[$orderby],SORT_ASC,$wp_cycle_images);
thats it. It worked for me. Let me know if it helps. and sorry for my bad English.