Jump to content

Labradoodle-360

Members
  • Posts

    34
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Male

Labradoodle-360's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Is there a reason that you're using the file functions rather than just using file_put_contents?
  2. My avatar is me Oh, I would definitely agree with that, although as of SMF 2.0 RC4 (I do believe) quite a few hooks were added, and now we're in SMF 2.0.2, and there are many more hooks available for use. Hooks are not required, by any means, but we definitely suggest that mod authors utilize hooks to broaden the use range of their modification. SMF 2.1 will have more extensibility for hooks, as of now most majour arrays have hooks, and definitely by the next release more useful ones will be included as well.
  3. If it's a form being submitted, you are correct. But if he's simply trying to output the number, disabling it wouldn't cause any issues, although in that case, it probably shouldn't be an input element, anyway.
  4. Not a problem, I'm glad you got it all worked out
  5. The scootstah's example is exactly how I'd do it, although I might personally also add disabled="disabled" to the input so it can't be directly modified, but they can still copy / paste the number ( I assume that's your goal )
  6. I'd be very intrigued to hear your thoughts on it's clumsiness.
  7. I'd personally suggest using the code I posted, I completely rewrote the block for you to be more efficient...
  8. Not to be rude, at all, but if you don't know PHP too extremely well, I doubt you'll want to venture down the road of AJAX as you'll need to know PHP, and JavaScript (fairly well). Might I suggest looking into the possibility of just using jQuery? If you don't need to fetch anything dynamic, jQuery should work just fine.
  9. Are you looking for something like echo ''; or print(); ? If not, in JavaScript, something like alert();?
  10. I'm going to send you a PM.
  11. Not really sure I understand what you mean. Can you provide a link, more detailed explanation or some screenshots so I can better assist you with your issue?
  12. If I understand you correctly, you're attempting to center your navigation bar in the browser? Why not just wrap the ul in a div, with the style text-align: center;? (You'd also need a width)
  13. How are you trying to execute the replace? If you're trying to replace the code client side, you'll need to use JavaScript, or jQuery/AJAX. If you can do it server side (via PHP) great. Here's the PHP code. $search = '<div class="postbody">'; $replace = '<div class="postbody <vb:if condition="$show[\'moderated\']">moderated</vb:if>">'; if (!empty($your_variable)) str_replace($search, $replace, $your_variable); # Make sure "$your_variable" is an existing variable that contains your HTML.
  14. A plugin system is a simple theory, although it can be more complicated to actually write it. There are two general approaches: hooks and modifications. The differences are very important to understand. Modifications make actual edits to file(s) and therefore can be more buggy, because actual code has to be modified; while hooks are a more clean approach because you can modify arrays dynamically therefore circumventing potentially buggy hacks/modifications. Both approaches can be found in SMF itself (this forum software), it allows mod authors to utilize hooks, yet still allows actual modification to its' files.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.