![]() |
Just compare your version to mine. :) It was not much of a change.
|
Uploaded it and it doesn't work for me lol
|
Are you sure the post is moderated?
|
Wait, I had the template edit in, give me a bit.
|
I unapproved the post and it shows Moderated Post next to the post ID
|
Ok give me a bit to work it out.
|
I am getting close on this. Had to completely re write the regex for the replacement.
Now I just have to get the css to get in place. |
I didn't think it would be that hard to use the str_replace function. It looks easy enough when looking at other mods/articles.
|
OK cool. Thanks very much ozzy.
Why is it so hard to do a str_replace on that div? |
Not sure how my post just inserted itself before yours although I was replying to you lol. And how did you post at 12:07 when vB states its 12:02 at the bottom of the page?
|
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. :) |
I did reply to you ozzy but the posts went above your last post for some reason.
|
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. |
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. :) |
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?
|
Ok here it is.
I added the stylevar for the background also for you. |
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 { |
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. |
Wierd, it should be showing as moderated. Care to send me a admin account so I can see what is going on?
|
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.
|
How do I go about debugging to find the cause of the problem?
|
Not sure, depends on alot of different variables.
|
Quote:
--------------- Added [DATE]1412248438[/DATE] at [TIME]1412248438[/TIME] --------------- I installed the mod again and for some reason it now changes the postbody class to postbody_moderated. Not sure why it's working now or what happened. But it now need the CSS to work. |
This has been fixed on the users site.
Black Snow, make sure you change the CSS in the master style to what I mentioned earlier. Code:
.postbitlegacy .postbody_moderated, .eventbit .eventdetails .eventbody { |
Thanks again ozzy. I am trying to make new stylevars for the mod. When I fill in all the boxes, select the product and click save, I get this error:
Quote:
|
Not sure, can't say I ever came across that before.
|
It works fine most of the time but now and then it pops up with that error and I can't add a stylevar to the product.
|
Try disabling hooks via includes/config.php and try again.
|
Quote:
|
Has to be something on your site, I just tried to add another stylevar to the mod and was successful.
|
Anything in the error logs?
|
It's not the mod you helped with, it's a fresh mod I'm making stylevars for.
|
If you pm me the XML file on my site, I can look at it later today.
|
Quote:
Code:
if ($vbulletin->options['url_active']) { Code:
text-decoration: $decoration; |
How do I go about adding a setting from a mod into a plugin?
I want to add an input box into my mod which an admin can enter a URL or name etc, then have the setting output the value via a plugin. --------------- Added [DATE]1413282284[/DATE] at [TIME]1413282284[/TIME] --------------- I know I can add this to a template: Code:
{vb:raw vboptions.this_settings} I suppose I would be better off creating a template, putting my code inside it, then running a plugin to call the template to insert it inside the showthread template? |
Kinda hard to say without 1, seeing your code, 2, knowing what it is you are trying to do and 3, knowing what the expected end result is desired.
|
Sorry, I was in the middle of making it work. I got it in the end. I am looking for your help ozzy, I will PM you my question.
--------------- Added [DATE]1413304843[/DATE] at [TIME]1413304843[/TIME] --------------- Looking for a way to show all available forums so I can make my mod work on only chosen forums. Any tutorial about how to achieve this? |
Is there a way to remove a chunk of code from a template using plugins? I know about the str_replace function but what about removing 20 lines from a template?
SHOWTHREAD template for example, how would I remove this: Code:
<vb:if condition="$show['threadrating']"> |
Why remove or hide the code, just set the $show['threadrating'] to false.
|
Because I want use the etiket template mod to put the options above the thread.
|
All times are GMT. The time now is 01:02 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|