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.

Cyricx 03-23-2007 12:00 PM

Great idea!! I definately agree with the being able to upload a pic and a printable version!!

I'm gonna keep my eye on this thread :)

akulion 03-23-2007 12:59 PM

great mod

i would like to make a suggestion: how about adding an image box somewhere so that a small picture of the dish can be uploaded

then it would look like a cool cook book :D

Great mod but unfortunately I wont be using it cos I already put like a 1000 recipes using GARS so it would be one heck of a job for me to transfer them over

but ill click install all the same in support :D

jackstraw01 03-23-2007 01:11 PM

Ok, I have this installed and it works great.

However, it would be nice if when viewing the profile of a member, if it would show how many recipes they have contributed much like the thank you mod.

Thanks.

UncoderMom 03-23-2007 02:39 PM

WOW! I have a recipe forum with hundreds of them!!! This is AWESOME!!!

UncoderMom 03-23-2007 02:40 PM

Quote:

Originally Posted by jackstraw01 (Post 1210354)
Ok, I have this installed and it works great.

However, it would be nice if when viewing the profile of a member, if it would show how many recipes they have contributed much like the thank you mod.

Thanks.

That sounds way cool!

Can you maybe give vbux for posting recipes too?

Michael Biddle 03-23-2007 06:24 PM

Do you mean just add the Stats to the user profile?

hawks_mp 03-23-2007 07:16 PM

Is it possible to modify this hack so it automatically wraps img or code tags around certain input fields?

SkyCatcher 03-23-2007 07:18 PM

Only think I don't like is that previously added recipies (normal threads) aren't displayed anymore because you've gotten rid of the postbit with that conditional.

Like the hack, just not sure what I'm going to do to get the old recipies into the new system.

Michael Biddle 03-23-2007 09:20 PM

The origional ones should still show up in the instructions part.

R-n-R 03-24-2007 05:09 AM

OK, I must be missing something here (which is highly possible for me at 1AM) I just add this Mod to my site (great idea!) and I modified all the templates as described in your above instructions, but I do not see where this mod is showing up?

I took a look at your Demo site and even registered. Again I do not see anything like in the screen shots, all I see was the normal Add a post box.

What am I missing here? Thanks for setting me straight! :p

SkyCatcher 03-24-2007 07:25 AM

Quote:

Originally Posted by R-n-R (Post 1210849)
OK, I must be missing something here (which is highly possible for me at 1AM) I just add this Mod to my site (great idea!) and I modified all the templates as described in your above instructions, but I do not see where this mod is showing up?

I took a look at your Demo site and even registered. Again I do not see anything like in the screen shots, all I see was the normal Add a post box.

What am I missing here? Thanks for setting me straight! :p

Go to your admincp > edit forums > find your recipe forum and scroll to the bottom. Enable the hack :P

R-n-R 03-24-2007 01:00 PM

Quote:

Originally Posted by SkyCatcher (Post 1210883)
Go to your admincp > edit forums > find your recipe forum and scroll to the bottom. Enable the hack :P

AH! Its amazing how sleep has an effect on the mind. I see that now, Thanks!

R-n-R 03-24-2007 01:28 PM

Well I guess a little more help is in order, I am getting a Database (MySQL) Error.

Here is the actual error(Blue letters/numbers omitted for real letters and numbers):

EDITED TO ADD: I only get this error when I enable the mod in my forum, and it effects all my templates not just the one I modified. When I DISABLE the Mod in the forum the MySQL Errors go away and forum works normally as before.

Quote:

Database error in vBulletin 3.6.5:

Invalid SQL:
SELECT count(postid) AS post_count FROM post WHERE threadid='12103';

MySQL Error : Table 'livingli_vbul.post' doesn't exist
Error Number : 1146
Date : Saturday, March 24th 2007 @ 10:16:56 AM
Script : http://www.<my domain>.com/forum/showthread.php?p=145025
Referrer : http://www.<my domain>.com/forum/newthread.php?do=postthread&f=108
IP Address : xxx.xx.xx.xxx
Username : <my user name>
Classname : vb_database

I used a existing forum (that might of had a total of 6 posts, it was recently added before I found this mod.

I get this error when I try to add a new recipe and I get this error when I try to view any exisitng (pre-mod) posts in threads.

Any ideas?

waller99 03-24-2007 03:27 PM

Same here when I try and create a new recipe.

Database error in vBulletin 3.6.4:

Quote:

Invalid SQL:
SELECT count(postid) AS post_count FROM post WHERE threadid='405';

MySQL Error : Table 'mofsql.post' doesn't exist
Error Number : 1146
Date : Saturday, March 24th 2007 @ 09:20:05 AM
Script : http://www.mysite.com/showthread.php?p=4798
Referrer : http://www.mysite.com/newthread.php?do=newthread&f=20
IP Address :00.00.00.00
Username : username
Classname : vb_database

SpanishHarlem 03-24-2007 05:14 PM

Quote:

Originally Posted by SkyCatcher (Post 1210572)
Only think I don't like is that previously added recipies (normal threads) aren't displayed anymore because you've gotten rid of the postbit with that conditional.

Like the hack, just not sure what I'm going to do to get the old recipies into the new system.

Thank's for letting me know. If that is the case. Will not be adding it to the big forum. I don't want to lose 700 recipes.

R-n-R 03-24-2007 05:24 PM

Quote:

Originally Posted by SpanishHarlem (Post 1211195)
Thank's for letting me know. If that is the case. Will not be adding it to the big forum. I don't want to lose 700 recipes.

Yeah, glad I only have 6 in mine now, justed the forum a few days ago.

SkyCatcher 03-24-2007 05:25 PM

Quote:

Originally Posted by SpanishHarlem (Post 1211195)
Thank's for letting me know. If that is the case. Will not be adding it to the big forum. I don't want to lose 700 recipes.

Dunno. The OP said that they should still show up. Fact is, if you disable the recipe mod in that forum your threads will appear as normal again. The old threads just aren't visible to me when activating it.

You can give it a try and see if it works, it won't delete your threads or posts. If it doesn't work, simply uninstall it :)

LRadunz 03-24-2007 08:37 PM

Quote:

Originally Posted by waller99 (Post 1211133)
Same here when I try and create a new recipe.

Database error in vBulletin 3.6.4:

I had the same problem and you can find the fix here:
http://www.vbhackers.com/f76/recipe-...42/index8.html

I don't know why the coder didn't use this info and place it here.

ssvp 03-24-2007 10:11 PM

So I got it all installed and it appears as if it work correctly. However upon filling in the fields. I get this error back:

The message you have entered is too short. Please lengthen your message to at least 1 characters.

waller99 03-25-2007 01:39 AM

Quote:

Originally Posted by LRadunz (Post 1211305)
I had the same problem and you can find the fix here:
http://www.vbhackers.com/f76/recipe-...42/index8.html

I don't know why the coder didn't use this info and place it here.


Thanks. That worked. I appreciate it. :up:

kfiasche81 03-25-2007 09:08 AM

UPDATE THIS MOD PLEASE !!!

http://www.vbhackers.com/f76/recipe-...html#post54484

Michael Biddle 03-25-2007 09:47 AM

Sorry about that guys, thought I already applied this updated, its in now

Michael Biddle 03-25-2007 09:49 AM

Sorry for double posting but it is updated now, so it will fix the post count problem

Michael Biddle 03-25-2007 09:52 AM

Quote:

Originally Posted by SpanishHarlem (Post 1211195)
Thank's for letting me know. If that is the case. Will not be adding it to the big forum. I don't want to lose 700 recipes.

this doesnt show it in postbit form, but it does show it in the instructions section.


and no your 700 recipies wont be lost, they will be in the instructions as well, might want to have users go back and edit it according

R-n-R 03-25-2007 05:30 PM

OK I downloaded the lastest update, but why is it when I click on "post preview" or "submit new thread" I get the following:

The following errors occurred when this message was submitted:

1. The message you have entered is too short. Please lengthen your message to at least 15 characters.

I have WELL over the number of characters I have the minimum set in vB, so whats the fix for this?

SpanishHarlem 03-25-2007 10:16 PM

Quote:

Originally Posted by whitemike (Post 1211696)
this doesnt show it in postbit form, but it does show it in the instructions section.


and no your 700 recipies wont be lost, they will be in the instructions as well, might want to have users go back and edit it according

Thank's Whitemike. I was really worried about that. It's a wonderful hack.

Michael Biddle 03-25-2007 10:25 PM

Not a problem. I thought about this problem during coding so the instruction part i left as message in sql rather then making a recipe_instructions like the rest

R-n-R 03-26-2007 12:17 AM

Quote:

Originally Posted by R-n-R (Post 1211957)
OK I downloaded the lastest update, but why is it when I click on "post preview" or "submit new thread" I get the following:



The following errors occurred when this message was submitted:

1. The message you have entered is too short. Please lengthen your message to at least 15 characters.


I have WELL over the number of characters I have the minimum set in vB, so whats the fix for this?

any ideas guys?

jackstraw01 03-26-2007 03:14 PM

Quote:

Originally Posted by whitemike (Post 1210539)
Do you mean just add the Stats to the user profile?

Yes, exactly what I mean.

ashley53680 03-26-2007 04:45 PM

This hack has great potential! I am subbing. :)


All times are GMT. The time now is 04:46 AM.

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.01730 seconds
  • Memory Usage 1,860KB
  • 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
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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