Yes, it comes up in WP-Admin->Plugins.
Right now, it is in:
wp-content/
--plugins/
----mypluginname/
------mypluginname.php
Unfortunately, I have to use prototype for this script..
There is a button on the page “More Stories” with the id=”MoreStories”.
var more_offset = 6;
$('MoreStories').observe('click', function() {
var moreAjax = new Ajax.Request('https://mysite.com/wp-content/plugins/myplugin/mypluginname.php?offset=' + more_offset, {
method: 'get',
onCreate: function() {
$('NewsStories_Container').setStyle({'background':'url(https://mysite.com/path/to/theme/images/ajaxloading.gif) bottom left no-repeat'});
},
onComplete: function(oReq) {
$('NewsStories_Container').setStyle({'background':'none'});
var data = oReq.responseText;
if (data != 'finished') {
if (data.substr(-8, 8) == 'finished') {
data = data.slice(0, -8);
$('MoreStories').fade({queue: 'end'});
}
$('NewsStories_Container').innerHTML += "<ul id='more"+more_offset+"' class='newslist' style='display:none'>" + data + "</ul>";
$('more'+more_offset).appear({queue: 'end'});
more_offset += 5;
}
else {
$('MoreStories').hide();
}
}
});
});
The way the previous programmer used a Template, I changed the Ajax.Request() url from his template to my plugin though. His template handled this script:
query_posts('showposts=5&caller_get_posts=1&offset='.$_GET['offset']);
$count = 1;
if (have_posts()) :
while (have_posts()) : the_post();
$categories = get_the_category();
$category = $categories[0];
foreach($categories as $cat) {
if ($cat->parent != 0)
$category = $cat;
}
$showurl = get_bloginfo('url')."/".get_the_time('Y')."/show-news/".the_slug();
?>
<li>
<h2><a href="<?=$showurl?>" title="<?php the_title(); ?>"><?php the_title() ?></a></h2>
<span class="PostInfo">By <?php the_author(); ?>, <?php the_time('F j, Y'); ?> in <?php the_category(', '); ?></span>
<?php
if ( p75HasThumbnail($post->ID) ) {
$dimensions = getimagesize('/home/dir/goes/here/'.p75GetOriginalImage($post->ID));
echo "<a href='$showurl' class='radius8' style='margin: 0 5px 5px 20px; float: left; clear: left; display: block; width: 145px; height: ".(floor(145*$dimensions[1]/$dimensions[0]))."px; background: url(".p75GetThumbnail($post->ID, 145).") no-repeat top left;'> </a>";
}
?>
<?php the_advanced_excerpt('length=190&use_words=0') ?>
<a class="readmore" href="<?=$showurl?>" title="<?php the_title(); ?>" >Read More</a>
<div class="bottomfade"><span class="left"> </span><span class="right"> </span><span class="mid"> </span></div>
</li>
<?php
if( (($wp_query->current_post + 1) == ($wp_query->post_count)) && $count != 5)
echo 'finished';
$count++;
endwhile;
else: {
echo 'finished';
}
endif;