vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Major Additions - Recipe Mod Database (https://vborg.vbsupport.ru/showthread.php?t=142871)

Michael Biddle 03-22-2007 10:00 PM

Recipe Mod Database
 
Recipe Mod
By: whitemike
Demo: Here
Official Requests: Here
NOTE: Support will be provided here, but I will get to it sooner on my official site. vBulletin Zone

Installation:
  1. Templates to add:3
  2. Templates to edit:3
  3. Plugins Added: 14
  4. Phrases Added: 12
  5. Quires ran: 9

Instructions:
  1. Import the Product .xml
  2. Edit templates
Editpost:

Find:

Code:

<!-- / subject field -->


Add Under:

Code:

<if condition="$threadinfo[firstpostid] == $postinfo[postid] AND $foruminfo[enable_recipe]">
$editrecipe
<else />

Find:
Code:

        $messagearea
        <!-- / message area -->

        $posticons
       
            </td>
        </tr>
        </table>
       
        </div>
    </div>



Add After:

Code:

</if>


Showthread:

Find:

Code:

$Navbar


Add Under:

Code:

<if condition="$foruminfo[enable_recipe]">
$recipe
</if>



Find:
Code:

<a name="poststop" id="poststop"></a>


Add Under:
Code:

<if condition="$no_posts">
<else />



Find:
Code:

<div id="posts">$postbits<div id="lastpost"></div></div>


Add Above:
Code:

</if>


Newthread:

Find:
Code:

<!-- / subject field -->


Add Under:
Code:

<if condition="$foruminfo[enable_recipe]">
$newrecipe
<else />



Find:

Code:

        <!-- / message area -->

        $imagereg

        $posticons
       
            </td>
        </tr>
        </table>
       
        </div>
    </div>



Add After:
Code:

</if>
Find:
Code:

<input type="submit" class="button" name="preview" value="$vbphrase[preview_post]" accesskey="r" tabindex="1" />
Replace with:
Code:

<if condition="$foruminfo[enable_recipe]"></else><input type="submit" class="button" name="preview" value="$vbphrase[preview_post]" accesskey="r" tabindex="1" /></if>

Postbit(_legacy):

Add at Top:


Code:

<if condition="$post[postcount] == 1 && in_array($thread['forumid'], array($vboptions[recipe_forums]))">
<if condition="$show['attachments']">
        <!-- attachments -->
            <div style="padding:$stylevar[cellpadding]px">
           
            <if condition="$show['thumbnailattachment']">
                <fieldset class="fieldset">
                    <legend>$vbphrase[attached_thumbnails]</legend>
                    <div style="padding:$stylevar[formspacer]px">
                    $post[thumbnailattachments]
                    </div>
                </fieldset>
            </if>
       
            <if condition="$show['imageattachment']">
                <fieldset class="fieldset">
                    <legend>$vbphrase[attached_images]</legend>
                    <div style="padding:$stylevar[formspacer]px">
                    $post[imageattachments]
                    </div>
                </fieldset>
            </if>
           
            <if condition="$show['imageattachmentlink']">
                <fieldset class="fieldset">
                    <legend>$vbphrase[attached_images]</legend>
                    <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                    $post[imageattachmentlinks]
                    </table>
                    </fieldset>
            </if>
           
            <if condition="$show['otherattachment']">
                <fieldset class="fieldset">
                    <legend>$vbphrase[attached_files]</legend>
                    <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                    $post[otherattachments]
                    </table>
                </fieldset>
            </if>
           
            <if condition="$show['moderatedattachment']">
                <fieldset class="fieldset">
                    <legend>$vbphrase[attachments_pending_approval]</legend>
                    <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                    $post[moderatedattachments]
                    </table>
                </fieldset>       
            </if>
           
            </div>
        <!-- / attachments -->
        </if>
<else />



Add at End:

Code:

</if>


Find:

Code:

<div>$vbphrase[posts]: $post[posts]</div>
Add After:
Code:

<div>$vbphrase[recipe_stats]: $post[recipe_stats]</div>


Fixes:

1.6
  1. Added another template edit into the newthread template to remove the preview post option

1.5
  1. Added a vboption for the forumid's for the templates to make easier on client side
1.4
  1. Added Template Grouping
  2. Cached Templates
  3. Other small minor changes
1.3
  1. Fixed Spelling - Duh
1.2
  1. Fixed Major Edit Post Bug - Thanks to Nick for opening my eyes
1.1
  1. Fixed Edit Post Bug
  2. Fixed Spelling Error

Thats it!

Configure
  1. Go to ACP -> Forums & Moderators -> Forum Manager -> Pick a forum and at bottom it has a new yesno setting
  2. Go to ACP -> vBulletin Options -> Recipe Mod Database -> Enter the forumid's used for your forum

Please Click Install if you use

Michael Biddle 03-23-2007 03:31 AM

Reserved for Future Use

Lionel 03-23-2007 04:12 AM

hi, 2 questions

1-Can you add a pic?

2-can you print recipe? If it's part of showthread it will not unless you add support code.

Michael Biddle 03-23-2007 04:59 AM

No and Not tested. Will think about these in future release though.

SpanishHarlem 03-23-2007 05:15 AM

In the process of trying to install. I keep getting this in the postbit legacy.

The following template conditional expression contains function calls:

<if condition="$post[postcount] == 1 && $thread[forumid] == x(22)">

Function Name Usage in Expression
x x(22)

With a few exceptions, function calls are not permitted in template conditional expressions. Please go back and re-write this expression.

The following functions are allowed in template conditional expressions:
in_array() is_array() is_numeric() isset() empty() defined() array() can_moderate() can_moderate_calendar() exec_switch_bg() is_browser() is_member_of()

We have almost 700 recipes on our forum. This would be some sweet hack. Thank's for that.

Michael Biddle 03-23-2007 05:55 AM

replace x with 22 so its

<if condition="$post[postcount] == 1 && $thread[forumid] == 22">

SpanishHarlem 03-23-2007 06:04 AM

Thanks. Must have done something wrong along the way. Guess I will check everything out and see where I went wrong. lol

hmmmm have gone through every template again and have installed the product. Try clicking on new thread and still isn't showing. yikes

SkyCatcher 03-23-2007 08:37 AM

I don't have time right now but when I get off work I will install this. It's something that I can really really use, thanks!

jackstraw01 03-23-2007 11:31 AM

Can this be made exclusive to one forum? I have a section for recipes on my forum, can I make it so that it only applies in that section and the usual post box appears elsewhere?

Hornstar 03-23-2007 11:47 AM

Not a bad mod for quite a few sites, nice work.


All times are GMT. The time now is 06:02 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01448 seconds
  • Memory Usage 1,780KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (20)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete