1

Topic: Advanced Find

Hey David,

Joined up and have installed Wolf on my server.  It'll take me a couple days, but I've found the database entry with regards to the use of the Advanced Find that I originally created.  I don't know what modifications have been made since then, though, if any.

Last edited by mtylerb (2010-12-08 22:41)

Cheers,

Tyler

2

Re: Advanced Find

Hi Tyler -

Great to welcome you to Wolf! smile You'll see jackie has put Advanced Find in the Repo. We can update the docs as you get them online. (I've added this thread for discussion, too.)

Using Wolf CMS professionally and for profit? Please consider supporting Wolf financially. Thanks!

3

Re: Advanced Find

And it might be useful to have a cross-reference here to the post about using Advanced Find as a helper rather than plugin. smile

Using Wolf CMS professionally and for profit? Please consider supporting Wolf financially. Thanks!

4

Re: Advanced Find

No modifications has been made!

Tutorials at Project 79 | Wolf CMS Docs

5

Re: Advanced Find

Alright guys.  It's not 100% since I don't have all the plugins I was using in Frog ... yet, but I've got the text part of the site up for the most part.  You can see the instructions for the plugin.  I'll work on getting Frog transitioned over to Wolf in the near future.

You can find it:

http://www.tbeckett.net/articles/plugins/adv-find.xhtml

On that note, it's nice to see that all my categorizations worked nicely in the transition.  Very little needs fixing and most of what does need fixing is cosmetic or a plugin issue.  I was a bit worried about my suckerfish menus, but you'll see they work perfectly.

Thanks!

Last edited by mtylerb (2010-12-07 09:31)

Cheers,

Tyler

6

Re: Advanced Find

Ok, the repo has officially confused me.  Everytime I edit a ordered or unordered list, it disappears when I save it.  I also can't figure out how to edit the version number.

Help?  :-S

Cheers,

Tyler

7

Re: Advanced Find

You can't change version number. It's done from backend side. Write it here and I'll change it. Perhaps in future it will be available for plugin maintainer to change it (that's up to Martijin and his further development of the repo)

As for lists, it gave me a headache too. Post it here and I'll try to edit it in admin, maybe it'll work.

Tutorials at Project 79 | Wolf CMS Docs

8

Re: Advanced Find

mtylerb wrote:

Everytime I edit a ordered or unordered list, it disappears when I save it.

Not sure I understand what you mean here. You're adding an (un)ordered list to the description which is then filtered out when submitting the new description?

Maybe the filter is a bit too strict. I'll check tonight.

mtylerb wrote:

I also can't figure out how to edit the version number.

The plugin repository is still under development. For now, you can't add/change individual versions. Give us the info and we'll change it. You should be able to manipulate individual releases before the end of the month though.

edit: I see jackie beat me to it. smile

Last edited by mvdkleijn (2010-12-08 11:25)

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution or see our financial report first.

9

Re: Advanced Find

-> Home
-> -> Category 1
-> -> -> Article 1
-> -> -> Article 2
-> -> -> Article 3
-> -> Category 2
-> -> -> Article 4
-> -> -> Article 5

That's essentially the list I was trying to create.  It jumbled up when I edited it for the first time.  As for version, I'm trying to change it to 1.0.2.

I also wanted to put the install instructions in an ordered list.  That's another one that disappeared when I edited it for the first time.  That WMD editor is a bit of a pain.

Cheers,

Tyler

10

Re: Advanced Find

mvdkleijn wrote:
mtylerb wrote:

Everytime I edit a ordered or unordered list, it disappears when I save it.

Not sure I understand what you mean here. You're adding an (un)ordered list to the description which is then filtered out when submitting the new description?

Maybe the filter is a bit too strict. I'll check tonight.

Yup, that's exactly what's happening.  Thanks!

Cheers,

Tyler

11

Re: Advanced Find

mtylerb wrote:

That WMD editor is a bit of a pain.

Not sure its the WMD editor, but as I said, I'll check it tonight.

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution or see our financial report first.

12

Re: Advanced Find

mtylerb wrote:

As for version, I'm trying to change it to 1.0.2.

Done.

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution or see our financial report first.

13

Re: Advanced Find

Just an FYI... I altered the Kses filter we're using for the repository to allow lists in the description field. For some reason that wasn't allowed. If its still too strict, let me know through the forum email. (to avoid "polluting" the forum) smile

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution or see our financial report first.

14

Re: Advanced Find

I've created a github for this plugin, as well.  It's been linked from the repo.  Please track any issues there.

Cheers,

Tyler

15

Re: Advanced Find

So I'll delete mine smile
You should add readme file aswell.

Tutorials at Project 79 | Wolf CMS Docs

16

Re: Advanced Find

jackie wrote:

So I'll delete mine smile
You should add readme file aswell.

Lol, all these githubs I don't know about.  Yep, I'm working on the readme.

Cheers,

Tyler

17

Re: Advanced Find

Please update repo to 1.0.3.  I've fixed the issue that was stopping it from having a limit of 1.  Github and my site have been updated.  I've also changed the license to be the same as Tagger.  Dual MIT & GPL instead of the Affero one.

Last edited by mtylerb (2010-12-17 16:56)

Cheers,

Tyler

18

Re: Advanced Find

Mods, please update the repo to version 1.0.4.  I've added a variable catch in the code to realize when there's no search to perform and give a reader usable error, rather than a fatal PHP error which will kill your page.

EDIT: Please update to 1.0.5.  I also added an enable/disable script, i18n compatibility, and security check that is compatible with Wolf 0.7.0+.

Last edited by mtylerb (2011-01-02 07:59)

Cheers,

Tyler

19

Re: Advanced Find

mtylerb wrote:

EDIT: Please update to 1.0.5.  ...

Got it -- thanks, Tyler!

Using Wolf CMS professionally and for profit? Please consider supporting Wolf financially. Thanks!

20

Re: Advanced Find

Mods, please update to 1.0.6.  Silly logic error that I just caught.  Probably won't display if you have debug turned off, but a logic error nonetheless.

Cheers,

Tyler

21

Re: Advanced Find

I'm using Wolf 0.6.0b and I run into a problem with Advanced Find 1.0.6,
I can't get past 10 displayed items even tough I've set the limit to 20:

<ol>
<?php $articles = adv_find(array('nieuws/2010'), array('order' => 'page.published_on DESC', 'limit' => '20')); ?>
<?php foreach ($articles as $article): ?> 
<?php echo '<li>' . $article->link() . ' ' . '<span>' . $article->date('%e %B %Y') .'</span></li>' . PHP_EOL; ?>
<?php endforeach; ?>
</ol>

Any solution that doesn't require a update to Wolf CMS 0.7.x?

22

Re: Advanced Find

Fortron wrote:

I'm using Wolf 0.6.0b and I run into a problem with Advanced Find 1.0.6,
I can't get past 10 displayed items even tough I've set the limit to 20:

<ol>
<?php $articles = adv_find(array('nieuws/2010'), array('order' => 'page.published_on DESC', 'limit' => '20')); ?>
<?php foreach ($articles as $article): ?> 
<?php echo '<li>' . $article->link() . ' ' . '<span>' . $article->date('%e %B %Y') .'</span></li>' . PHP_EOL; ?>
<?php endforeach; ?>
</ol>

Any solution that doesn't require a update to Wolf CMS 0.7.x?

Yeah, give me a few minutes to an hour.  I know what the problem is.

EDIT: Ok, I thought I knew the problem, but apparently I did do it right.  Are you sure you've got more than 10 articles in nieuws/2010?  Advanced Find is working correctly on my site when I increase to 20.  My homepage, for instance, works like this:

<?php 
$slugs = adv_find(array('articles'),array('where' => 'title NOT LIKE "Plugins"'));
foreach ($slugs as $slug) {
  $child[] = '/'.$slug->parent()->slug().'/'.$slug->slug().'/';
}
$articles = adv_find($child, array('order' => 'published_on DESC', 'limit' => '20')); 
?>
<?php foreach ($articles as $article): ?> 
<div class="entry">
  <h3><?php echo $article->link(); ?></h3>
  <?php echo $article->content(); ?>
  <?php if ($article->hasContent('extended')) echo $article->link('Continue Reading&#8230;'); ?>
  <p class="info">Posted by <?php echo $article->author(); ?> on <?php echo $article->date(); ?></p>
</div>
<?php endforeach; ?>

You can see that at the top it searches for all slugs under the articles heading and then sets up the adv_find call accordingly.

Last edited by mtylerb (2011-01-29 04:09)

Cheers,

Tyler

23

Re: Advanced Find

mtylerb wrote:

Are you sure you've got more than 10 articles in nieuws/2010?

And this is the code on that page:

<h2>Nieuws jaararchief</h2>
<p>Using adv_find()</p>
<ol>
<?php $articles = adv_find(array('nieuws/2010'), array('order' => 'page.published_on DESC', 'limit' => '20')); ?>
<?php foreach ($articles as $article): ?> 
<?php echo '<li>' . $article->link($article->title()) . ' ' . '<span>' . $article->date('%e %B %Y') .'</span></li>' . PHP_EOL; ?>
<?php endforeach; ?>
</ol>

<h2>Nieuws jaararchief</h2>
<p>Using $this->find().</p>
<ol>
<?php $page_article = $this->find('nieuws/2010/'); ?>
<?php foreach ($page_article->children(array('order' => 'page.published_on DESC')) as $article): ?>
<?php echo '<li>' . $article->link() . ' ' . '<span>' . $article->date('%e %B %Y') .'</span></li>' . PHP_EOL; ?>
<?php endforeach; ?>
</ol>

It is related to this variabele in adv-find's index, when I change it to 20 it display's 20 items:

$varmod['limit'] = 10;

I seems that the limit doesn't get passed to the plugin?

Last edited by Fortron (2011-02-02 17:02)

24

Re: Advanced Find

Fortron remove the single quotes from the limit => value.

...
<?php $articles = adv_find(array('nieuws/2010'), array('order' => 'page.published_on DESC', 'limit' => 20)); ?>
...

Last edited by andrewmman (2011-01-29 19:27)

Thumbs up

25

Re: Advanced Find

andrewmman wrote:

Fortron remove the single quotes from the 'limit' value.

Hello andrew, I did that but it still display's only 10 items:

<?php $articles = adv_find(array('nieuws/2010'), array('order' => 'page.published_on DESC', limit => '20')); ?>