The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Notice Flush/add to Cache
Hello,
I made a notice creator form that will easily create notices for my staff (with no HTML involved for them). Basically, it's a HTML form that they enter the info, and it makes it into HTML for them (e.g. if they put Color #FF0000, when I pass it through the query to add the notice's phrase, it'll do <font color="#FF0000">). I'm not comfortable sharing my code publicly, however, it works. It adds the notice to the notice table correctly, the noticecriteria table correctly, and the phrase table correctly. Here's the problem. Notices are cached. The cache isn't flushed unless you add a notice from the ACP or modify one. How can I flush the cache when adding a notice from my form? Or how can I add the notice they just made with my form to the cache? (whichever one is the right one). Thanks for any help. If someone wants to help privately, I don't mind sending my code. |
#2
|
|||
|
|||
The admincp code does this when it's finished:
Code:
// update the datastore notice cache require_once(DIR . '/includes/adminfunctions_notice.php'); build_notice_datastore(); // rebuild languages require_once(DIR . '/includes/adminfunctions_language.php'); build_language(); |
#3
|
|||
|
|||
Quote:
However, I don't use the same variables used in adminfunctions_notice.php If I remade that file with different names and changed the variables to match my own, do you think it'd work? Would you mind if I PM'd you my code? |
#4
|
|||
|
|||
Well, the lines I posted rebuild the notice cache and the languages (because a phrase was added), so I don't think it matters what variables your code uses. Unless I'm not understanding the issue.
|
#5
|
|||
|
|||
That is my issue, you're right.
I tried adding that piece of code where my queries are executed, but upon submission, I received a blank, white page. I can't give you an error because error reports are off. Perhaps I need to do what this person did? https://vborg.vbsupport.ru/showthread.php?t=231389 He said he needed to include fetch_js_safe_string.. how could I do that? Is that needed? |
#6
|
|||
|
|||
Quote:
Code:
require_once(DIR . '/includes/adminfunctions.php'); |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|