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)

ericgray 04-16-2007 11:58 AM

Quote:

Originally Posted by ssvp (Post 1228001)
Well I got my editpost thing fixed..

Here's what I did..

Edited the Plugin

recipe_editpost_update_complete

Replaced Code with
Code:


if($foruminfo['enable_recipe']){
$recipe_description = addslashes($_POST['recipe_description']);
$recipe_difficulty = addslashes($_POST['recipe_difficult']);
$recipe_prep = addslashes($_POST['recipe_prep']);
$recipe_ingrediants = addslashes($_POST['recipe_ingrediants']);
$recipe_time = addslashes($_POST['recipe_time']);
$recipe_size = addslashes($_POST['recipe_size']);
$recipe_steps = addslashes($_POST['message']);
$db->query_write("UPDATE " . TABLE_PREFIX . "thread SET recipe_description = '$recipe_description', recipe_difficult = '$recipe_difficulty', recipe_prep = '$recipe_prep', recipe_ingrediants = '$recipe_ingrediants', recipe_time = '$recipe_time', recipe_size = '$recipe_size', recipe_steps = '$recipe_steps' WHERE threadid = '$threadinfo[threadid]'");
}

It now doesn't SQL Error out.. But haven't done much testing further..

good fix, sir -- works for me, too --

thanks!

LEAD_WEIGHT 04-24-2007 10:14 PM

Does your Mod let you upload an image, so people may know how a dish should look like.

Your demo link is missing a url character in your thread starter post whitemike .

thepub 04-24-2007 10:34 PM

have you fixed the edit post problem?

LEAD_WEIGHT 04-24-2007 10:40 PM

Quote:

Originally Posted by thepub (Post 1234973)
have you fixed the edit post problem?

I think it is fixed as it does say in thread starter and post made by ericgray I will wait till coder mentions if fixed was applied,

ArchangelX 04-25-2007 01:53 AM

It's not fixed. :(

When I try to edit the replies...it always takes me back to the main thread. I added Eric's code, too. :(

ArchangelX 04-25-2007 06:55 AM

To clarify, the Edit Post bug doesn't show the syntax error anymore, but what I'm getting is that if you post a response directly after submitting the code, if you try to edit the #2 post in the thread, it will take you to the 1st post and you can't edit it.

Any suggestions on what's going there? Thanks.

StarBuG 04-27-2007 06:28 AM

Some information about how this hack works would be nice.

Does it uses a forum and every recipe creates its own thread?
Or does it use the database?

Please update your original hack post with some information like it is standard on vB.or ;)

Christine 04-28-2007 05:31 PM

As of the build today (downloaded about a hour from post time), this is still an issue on editing.

This fixed it:
Quote:

Originally Posted by ssvp (Post 1228001)
Well I got my editpost thing fixed..

Here's what I did..

Edited the Plugin

recipe_editpost_update_complete

Replaced Code with
Code:


if($foruminfo['enable_recipe']){
$recipe_description = addslashes($_POST['recipe_description']);
$recipe_difficulty = addslashes($_POST['recipe_difficult']);
$recipe_prep = addslashes($_POST['recipe_prep']);
$recipe_ingrediants = addslashes($_POST['recipe_ingrediants']);
$recipe_time = addslashes($_POST['recipe_time']);
$recipe_size = addslashes($_POST['recipe_size']);
$recipe_steps = addslashes($_POST['message']);
$db->query_write("UPDATE " . TABLE_PREFIX . "thread SET recipe_description = '$recipe_description', recipe_difficult = '$recipe_difficulty', recipe_prep = '$recipe_prep', recipe_ingrediants = '$recipe_ingrediants', recipe_time = '$recipe_time', recipe_size = '$recipe_size', recipe_steps = '$recipe_steps' WHERE threadid = '$threadinfo[threadid]'");
}

It now doesn't SQL Error out.. But haven't done much testing further..

Thanks for the hack, Mike -- love this. :D

Christine 04-28-2007 05:39 PM

Mike,

You also need to change "ingrediants" to "ingredients" in your .xml

Thanks again!

ArchangelX 04-28-2007 06:00 PM

Have you tried editing the posts? Did you have any problems with it editing the original post, but not the replies?

Aimee1969 04-28-2007 06:05 PM

Please complete both the subject and message fields.

I get this message when someone posts....can someone help me?

Christine 04-28-2007 09:22 PM

Quote:

Originally Posted by Lionel (Post 1210097)
2-can you print recipe? If it's part of showthread it will not unless you add support code.

Quote:

Originally Posted by whitemike (Post 1210111)
No and Not tested. Will think about these in future release though.

I added this as an add-on mod for this product:

https://vborg.vbsupport.ru/showthread.php?t=145976

Christine 04-28-2007 10:23 PM

Quote:

Originally Posted by ArchangelX (Post 1237172)
Have you tried editing the posts? Did you have any problems with it editing the original post, but not the replies?

I am not having any trouble editing anything since I overwrote the plugin.

ArchangelX 04-28-2007 10:27 PM

I'm not sure if I was clear, what I meant...is if someone posts a reply AFTER the recipe is created, and the goes back to try and edit that reply...they end up editing the recipe and not their response?

That's the problem I was having, and I did the same thing you did...so I was wondering what's different. Thanks.

Christine 04-28-2007 10:38 PM

Quote:

Originally Posted by ArchangelX (Post 1237286)
I'm not sure if I was clear, what I meant...is if someone posts a reply AFTER the recipe is created, and the goes back to try and edit that reply...they end up editing the recipe and not their response?

That's the problem I was having, and I did the same thing you did...so I was wondering what's different. Thanks.

Yep -- you are right. If you do s quick edit, it is fine, but if you go to advanced mode, it opens up the recipe for editing.

Let me see if I can fix this.

ssvp 04-28-2007 10:45 PM

Quote:

Originally Posted by Christine (Post 1237290)
Yep -- you are right. If you do s quick edit, it is fine, but if you go to advanced mode, it opens up the recipe for editing.

Let me see if I can fix this.

That would be supersweet!

ArchangelX 04-28-2007 10:47 PM

Yes, I agree! I'm not a coder...I'm just a plugger-inner! Heh. I'd appreciate it if anyone knowledgeable could try to figure it out...I gave it a shot, but I was kinda lost, to be honest, and gave up. :)

Christine 04-28-2007 10:59 PM

Here's a quick fix (and it is working).

In the editpost template:

FIND

Code:

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

REPLACE WITH

Code:

<if condition="$post[postcount] == 1 && $thread[forumid] == x">
Where x is the forum id of your recipe forum.

Christine 04-28-2007 11:04 PM

Well, that didn't work -- now the recipe can't be edited to the thread table. At least it is secure now where other people can't edit it. I will take another look...

ArchangelX 04-28-2007 11:09 PM

Thanks for your hard work Christine...my users love this new feature...so I must thank you for looking into it.

Christine 04-29-2007 12:34 AM

I know I am rusty about coding in vB, but I can't for the life of me figure this out. For now, I overrode editing in that forum -- it is entry only for right now.

It seems the last time the hack author visited this thread was about 2 weeks ago. I will try to see if I can figure this out tomorrow with fresh eyes.

*sigh*

Aimee1969 04-29-2007 04:13 AM

Quote:

Originally Posted by Aimee1969 (Post 1237175)
Please complete both the subject and message fields.

I get this message when someone posts....can someone help me?

Can someone Please help me?? I get that message and they can't post???? Thank you {{hug}}

Christine 04-29-2007 11:36 AM

All,

Due to the security holes on this modification, I will be removing it as it requires a complete rewrite due to how the data is being stored in the tables. Mike posted to me on the VBHackers thread that he will get to it in a "week or so".

Best wishes,

Paul M 04-29-2007 12:00 PM

Moved to Graveyard until the author can address the security issues.

Paul M 05-01-2007 08:04 PM

Now restored.

Michael Biddle 05-01-2007 08:13 PM

Problem is now fixed. redownload new update

ArchangelX 05-01-2007 08:22 PM

Thanks Mike! Great work!

ArchangelX 05-01-2007 08:25 PM

Ahh...I guess the new Edit Post bug is still there, though, huh? :(

Michael Biddle 05-01-2007 08:44 PM

what bug?

Michael Biddle 05-01-2007 08:45 PM

Everything should be fixed. i fixed the edit post bug

Fungsten 05-01-2007 09:11 PM

Templates or can we just import the new XML? Thanks.

On Edit:

When I tried to import it and overwrite, etc., I had a DB error. What I did was to Uninstall the old XML then install the Updated XML and everything went fine!

Michael Biddle 05-01-2007 10:03 PM

Just reimport

Fungsten 05-01-2007 10:08 PM

Quote:

Originally Posted by whitemike (Post 1239313)
Just reimport

I mentioned it in case anyone else is confused.

Michael Biddle 05-01-2007 10:37 PM

Yea the overwrite function doesn't work right. It should uninstall then reinstall with the new line but doesn't do it. So yes you must first uninstall, then reinstall the new one.

ssvp 05-01-2007 11:45 PM

Quote:

Originally Posted by Fungsten (Post 1239268)
Templates or can we just import the new XML? Thanks.

On Edit:

When I tried to import it and overwrite, etc., I had a DB error. What I did was to Uninstall the old XML then install the Updated XML and everything went fine!


Hrm I did that.. Then it wiped out all my receipe First Posts.. They are all N/A now..Blah..

Michael Biddle 05-02-2007 03:11 AM

Quote:

Originally Posted by ssvp (Post 1239356)
Hrm I did that.. Then it wiped out all my receipe First Posts.. They are all N/A now..Blah..

We'll if you are upgrading. And doont wanna lose them. Then remove the install code. And it will work.

ericgray 05-02-2007 03:30 AM

this is scary -- i don't want to upgrade -- for fear of losing junk --

:|

thepub 05-02-2007 03:47 AM

ok it worked thanks! Is there not anything you can do about the extra thread that follows directly under the posted recipe? It just seems needless and would make the mod look cleaner if it were gone.

ssvp 05-02-2007 04:02 AM

Quote:

Originally Posted by whitemike (Post 1239451)
We'll if you are upgrading. And doont wanna lose them. Then remove the install code. And it will work.

Well I did the uninstall and then reinstalled as earlier is was suggest the overwrite didn't work.. So open for suggestions now..

ssvp 05-02-2007 04:17 AM

Quote:

Originally Posted by whitemike (Post 1239451)
We'll if you are upgrading. And doont wanna lose them. Then remove the install code. And it will work.

Even after the fact of what I posted?


All times are GMT. The time now is 03:55 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.01418 seconds
  • Memory Usage 1,824KB
  • 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
  • (4)bbcode_code_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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