Announcement

Collapse
No announcement yet.

How to update a replacement value via scheduled task?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to update a replacement value via scheduled task?

    I posted this at vbulletin.org but no response and was hoping I could get some feedback on this problem.

    Since replacement values are stored in arrays, I'm having a hard time figuring out how I could update a replacement value using a scheduled task. What I'm trying to accomplish is to have in the header a one-line news link from another site of mine that updates frequently. Creating a replacement value of {front_page_news} (or something to that effect) to update to a link and some text works great, and I can write a script to "grab" the info from this other site, but I can't figure out how to update the replacement value in a script. Even updating the style replacements value with the exact value in there currently will give me array errors on the front page.

    I'm just now getting my feet wet with vb3, so I apologize if this doesn't sound like the best way to do this.... but is there a way to update a single replacement value via a scheduled task, and if not... is there an easier way to accomplish my goal? I appreciate the help.

  • #2
    I don't know how to do this off hand. Because this involves custom PHP code, I recommend you post on www.vbulletin.org. You will have better luck over there.

    Comment


    • #3
      If it's stored as an array in the database, you'd want to fetch the data from the database, unserialize it, update whatever you like, serialize it again and insert into the database.
      Best Regards
      Colin Frei

      Please don't contact me per PM.

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      X