vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Need to convert custom thread template to normal post (https://vborg.vbsupport.ru/showthread.php?t=287445)

singabaloo 09-13-2012 07:40 PM

No, that worked well. I kept the bbcode tags and outputted to pre and it allows me to see the correct formatting I was after (after I copy and paste a row into the VB editor and preview it.

Thanks, i'll tinker around about more with the formatting and then start joy of updating the posts table.

--------------- Added [DATE]1347608664[/DATE] at [TIME]1347608664[/TIME] ---------------

OK, ran a test update and it *nearly* went perfectly.

What I missed is that the current contents of post.pagetext needs to remain, ideally after I add more formatted string.


So I need to insert $recipe into the begining of post.pagetext. Is there an SQL command like that, or should I read it into the array using some funkly JOIN thing (that I still haven't worked out) ?

--------------- Added [DATE]1347625652[/DATE] at [TIME]1347625652[/TIME] ---------------

Ok, managed to sort that out so it doesn't overwrite the existing data in pagetext.

All I need to do now is find a way to add a space or something when a field is empty so the formatting doesn't screw up and I'm laughing.

Is there an easy way to read all the fields in the current $recipe row and insert a space if the field is empty? Or does it need to be a check of each field ?

singabaloo 09-17-2012 05:03 AM

Ended up install a plugin that lets you use [ NBSP] BBCode to insert a nbsp; A bit over the top but it worked.

kh99 09-17-2012 10:54 AM

Sorry, I missed your other questions because of the auto merge thing. But I think adding a bbcode was probably the only way to that.

singabaloo 09-17-2012 10:10 PM

That auto-merge is annoying.

All converted now. Thanks for you help.

smnoel 02-06-2013 05:19 PM

Could you post your updated/final code singabaloo?


All times are GMT. The time now is 06:30 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.01679 seconds
  • Memory Usage 1,712KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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