Archive for myfreeforum.org Before posting please check the "stickies" in the support forums.
Please ask questions in real English and not "txt". You will get a better response.
Please do not ask support questions via PMs.
 



       myfreeforum.org Forum Index -> What's new? Announcements!
admin (no pm's please)

Phpbb2: Catalog portal

This is a very powerful new feature that will be ported to phpbb3 as well.

It allows you do define a searchable database of forum posted that are cataloged by any criteria you like.

Here we see the set up of a recipe database. Note the admin panel colors are not from myff, don't be confused by that, it is simply the screenshots come from downsizer.net where this has been being tested.


Firstly lets look at the CATALOG portal itself, at the top we have some basic permissions:



Now we have to define what information we want to form the main search indexes:

Index 1:



Index 2:



Index 3:




Index 4:




You can define up to six indexes.

You may note that in our example index3 and index4 are identical. This brings us on to the fact that the searching pays no regard to which indexes are searched, they all will be along with the post text, title and author if that has been requested. However index values are stored in a special way, so for example if you have Beef as an index value, and search on Beef as an index, then posts that simply have the word Beef will not be found.

Which brings be to the next point, nothing at all will be found unless someone catalogs the post in the first place!

We need code in viewtopic_body.tpl

Code:

<a class="gensmall" href="javascript:void(0)" onclick="window.open('/catalog.php?component=catalog&popup=1&p={postrow.POST_ID}','recipe','height = 300, width = 300')">Mark/Edit as recipe</a>


Is an example, widening the view to show context:

Code:

   <tr>
            <td width="100%"><a href="{postrow.U_MINI_POST}"><img src="{postrow.MINI_POST_IMG}" width="12" height="9" alt="{postrow.L_MINI_POST_ALT}" title="{postrow.L_MINI_POST_ALT}" border="0" /></a><span class="postdetails">{L_POSTED}: {postrow.POST_DATE}<span class="gen">&nbsp;</span>&nbsp; &nbsp;{L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td>
            <td valign="top" nowrap="nowrap">{postrow.QUOTE_IMG} {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG} <a class="gensmall" href="javascript:void(0)" onclick="window.open('/action.php?action=REPORT&popup=1&p={postrow.POST_ID}','report','height = 300, width = 300')">Report Post</a>&nbsp;<a class="gensmall" href="javascript:void(0)" onclick="window.open('/catalog.php?component=catalog&popup=1&p={postrow.POST_ID}','recipe','height = 300, width = 300')">Mark/Edit as recipe</a>
<!-- IF S_USER_LEVEL > 0 -->
&nbsp;<a class="gensmall" href="/action.php?action=MODACTIONS&popup=2&u={postrow.POSTER_ID}">Moderate User</a>
<!-- ENDIF -->
</td>
         </tr>


This will bring up the catalog template:





Hopefully I hear you say at this point that that does not look like a recipe being cataloged! and at this point I refer you back to the first screenshot that gives permissions on you can can catalog stuff and who can approve the entries before they are actually in the search system.
Some one with approval rights can approve recipes from within the post using the same button used to catalog a post, and indeed they can tweak the entry if they want. But the is also an admin template:

This has the link:

index.php?component=catalog&adminmode=1

and looks like:




So now we have a catalog set up, how do we use it? We have to set up a CATALOGDISPLAY portal:




This defines what the search screen will look like. Note that we only define 3 search indexes in this case, as two of our entry indexes were the same and so we decide that it is better to keep it simple, a recipe may fit into two special categories, but the user is unlikely to want to specify two special categories when actually searching.

The search screen is :





Note the URL at the top showing how to get to the search. You of course need this link somewhere on your system for people to be able to search your catalog.

Some search results:




Note the results are a lot more OR than AND, we may introduce alternative search modes later.

Clicking on a recipe:




Note that whilst I have not shown it in the screenshots, forum formating, pictures etc will show.

The link in the recipe is to the post itself.

What else can be said?

In the cms_catalog.tpl template there is a {catalog_indexes.HELP} macro available, it just is not used in the default template.

When cataloging a post, it must be either the first post of a thread or have a subject defined for a post.
Zudane

Very nice, I'm sure a guide will be much more useful in the end.

From the macros you show, I'm guessing this is a phpbb2 feature?  Or is it added for both?
admin (no pm's please)

The code will be pretty much identical in phpbb3, but let's see it settle just a little on phpbb2 first.

       myfreeforum.org Forum Index -> What's new? Announcements!
Page 1 of 1
Create your own free forum | Buy a domain to use with your forum