vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Creating Addons (https://vborg.vbsupport.ru/showthread.php?t=314198)

ozzy47 09-30-2014 10:07 AM

The issue is what we are trying to replace with. I had looked into this just about a year ago and failed. I have just about got it right as of now, but I neet to test it against other mods to make sure it won't break them.

So hopefully later today I will have this ready. :)

Black Snow 09-30-2014 10:40 AM

I did reply to you ozzy but the posts went above your last post for some reason.

Black Snow 09-30-2014 11:33 AM

Haha! Something wrong with vB then.

Well at least your getting something out of helping me. Be nice to have all your temp mods as real mods.

ozzy47 09-30-2014 11:39 AM

Who knows what's going on with the post times. :confused: I noticed it happen yesterday as well.

As for the str_replace it is difficult because of what we are adding, it needs to be done while the template is being compiled, but I got it working, so I should have this ready for you later today.

Good thing is now I can redo my template modifications, that did something similar and turn them into real mods. :)

Black Snow 09-30-2014 12:02 PM

After an addon is made and you are testing it, how can you test what the output is? Can you use print or echo to see the output of your code?

ozzy47 09-30-2014 09:28 PM

Ok here it is.

I added the stylevar for the background also for you.

ozzy47 09-30-2014 10:15 PM

There is one change you need to make th the CSS template. Remove what is in there and replace it with this:

Code:

.postbitlegacy .postbody_moderated, .eventbit .eventdetails .eventbody {
    margin-{vb:stylevar left}: {vb:stylevar postbitlegacy_userinfo_width};
    border-{vb:stylevar left}: {vb:stylevar postbit_userinfo_border};
    background: {vb:stylevar mod_post_background_color};
    padding-bottom: -1em;
}

I forgot I had some of the values hard coded for testing.

Black Snow 10-01-2014 06:56 AM

1 Attachment(s)
Still nothing happening for me when I install it and make the changes. I think I also need to make the settings for the background colour as there is only the setting to enable the mod.

You can see on the attached image that the post is moderated and the div class is still postbody.

ozzy47 10-01-2014 09:00 AM

Wierd, it should be showing as moderated. Care to send me a admin account so I can see what is going on?

ozzy47 10-01-2014 09:32 AM

I just tested this on a vanilla vB4 site and it is working, so I would need to debug what is going on with your site that is stopping the mod from working.


All times are GMT. The time now is 11:04 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.01029 seconds
  • Memory Usage 1,731KB
  • 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)bbcode_code_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
  • (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