vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Alternate First Post (https://vborg.vbsupport.ru/showthread.php?t=177709)

Digital Jedi 05-06-2008 02:09 PM

I did indeed try that. But no error when saved when inactive. I can actually recreate the error by linking you to the same page you get after editing: http://www.cogonline.net/forums/show...025#post351025

I may just have to go through my HTML with a fine tooth comb.

--------------- Added 06 May 2008 at 12:51 ---------------

Hrm, I think I know what was wrong. I think I was missing the $post[scrolltothis] variable. Just a guess, but I'm not getting the error now.

Digital Jedi 05-08-2008 07:59 PM

If I might ask an additional question related to this, I thought I was being pretty smart here, but apparently, reality is determined to prevent that from ever happening.

What I was trying to do was change the first post in the thread using this plugin, then I made the forum I was using it in use a child style. I pasted in the postbit code into postbit_legacy of the child style, and set the plugin to include that forum. The intention, was to keep the rest of my forum in postbit_legacy, have the specific forum use the postbit layout AND alter the first post of threads in that forum.

Well, it works. Problem is, I get one of those dreaded repetative errors at the top of the page. Warning: Unexpected character in input: ''' (ASCII=39) state=1 in forum/path/forums/includes/class_postbit.php(296) : eval()'d code on line 224.

I've managed to use the plugin several times with no problems and with different postbit designs. Is the child style my problem now?

Maybe there's was a simpler way to go about what I was trying?


EDIT: And if I might add, the posts look kind of funky. The content is off center.

Lynne 05-08-2008 08:20 PM

Let me see if I understand what you've done.

You have a site with several forums. One forum, x, you want to have shown with a new template as the first post and the rest of the posts in the thread show the postbit template. For all the other forums, you want the postbit_legacy template to be used.

So, you have postbit_legacy set to be the post template used, then you created a new style, a child of your main one, and replaced the postbit_legacy template with the postbit template. You set this style as the default forum style for that forum in the Forum Manager. And, you have a plugin that says when in forum x, use a new template for the firstpost in the thread.

The way you have done it *should* work. However, there seems to be a problem with another plugin you have that uses the postbit_display_complete hook (executed on line 296 of class_postbit.php as shown in your error.) You may want to try disabling any other product using that hook and see if you get that error.

Digital Jedi 05-08-2008 09:43 PM

You got it. That's exactly what I was trying to do.

Okay, strange happenings. I didn't realize the error was site wide. Some forums wouldn't show at all. Disabling each one using that hook didn't have any effect. So I turned off the forced style in the Forum Manager, to no effect. I deleted the child style, and still kept getting the error. So I just decided to delete the plugin and try again...

And it's working okay now. :confused:

Is it possible that when I first saved the plug, it didn't save right? Can a plugin be corrupted somehow? I quadruple checked the code to make sure it was correct the first time. (DJ's school of coding. When all else fails, delete everything.)

Lynne 05-08-2008 09:53 PM

Do you have any other plugins using that hook? I wonder if two plugins are conflicting with each other.

What about, are you sure your new postbit is correct? Maybe try testing it out on a test site or on a style that only you have access to and see if it is your postbit causing the error.

Digital Jedi 05-08-2008 10:19 PM

I did try that, but continued to receive the error until I deleted the plugin altogether. But like I said, it's working fine now. The solution seemed to require me to delete the plugin and make it again. The thing is, I'm sure the code was correct the first time. I resaved it four times. But making it over seemed to be only thing that helped. I guess it was corrupted, or maybe my steps where in the wrong order?

Lynne 05-08-2008 10:45 PM

For some reason I missed that line that said it was working OK now. (I swear I had my glasses on, but.....). Anyway, I'm glad it is cuz I really couldn't think of why it would not work for you.

Digital Jedi 05-09-2008 12:04 PM

Anything like that happens to me, and I blame it on either the absence or deficiency of caffeine related products. :)

In any case, many thanks for sharing the plugin with me. It has been the means to a great many ideas that I previously didn't know how to implement.

tsuNami 08-01-2008 04:52 AM

thank you, Lynne.

your solution works like a charm for my board! :)

regards.


All times are GMT. The time now is 08:59 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.01722 seconds
  • Memory Usage 1,740KB
  • 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
  • (9)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