Web Analytics Made Easy -
StatCounter ~QUESTION~ Administrator/Moderator Images - CodingForum

Announcement

Collapse
No announcement yet.

~QUESTION~ Administrator/Moderator Images

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

  • ~QUESTION~ Administrator/Moderator Images

    Hi, Im looking for a way to get custom admin/mod buttons/images for when a mod/admin posts or if just viewing there profile.
    If there's any suggestions, tutorials or just a code that you could give me, i'd really appreciate it. (:

    Thanks.
    Check out my new forums: http://www.moderncoding.co.nr (:

    Strengths: HTML & CSS.


    Code:
    EpicFriends x = 
    players.getNearest(BestFriend);
    if (x != null) {
    x.interact("High Five" + x.getName());

  • #2
    If you have a blank button, and a particular font & color that you would like
    put on the button, you could use PHP (GD image library) to create an actual
    GIF image with your text on the button (as a real GIF image) ... or PNG.

    I mention GIF and PNG because of its transparency features.

    Provide a link to a blank button that you really like ... I'll give you an example.


    .

    Comment


    • #3
      This is going to be really hard unless you know PHP.

      First of all, here is an example of putting text on a PNG image.
      The resulting image is an actual PNG file, as opposed to putting
      text on a background image (using CSS).



      Here is the actual PHP script that creates the PNG image (called "png.php") ...
      PHP Code:
      <?php

      // Load the image 
      $im imagecreatefrompng("button2_blue_blank.png");
        
      // If there's an error, die
        
      if(!$im) {
        die(
      "");
        }
        
      $textColor imagecolorallocate($im255255255);
        
      $width imagesx($im);
        
      $height imagesy($im);
        
      // Define the True-type font to use
        
      $font "arialbd.ttf"
        
      $fontSize 20;
        
      $text "samxdesigns";
        
      // Calculate the left position of the text 
        
      $leftTextPos = ($width imagefontwidth($fontSize)*strlen($text)) / 7.0;
        
      // Write the string
        
      imagettftext($im$fontSize0$leftTextPos$height-24$textColor$font$text);
        
      // Output the image 
        
        
      header('Content-type: image/png'); 

      imagesavealpha($imtrue); 
      imagealphablending($imtrue); 
      imagepng($im); 
      imagedestroy($im); 

      ?>

      To display the image, I use this HTML ...
      <img src="png.php" />

      referencing the PHP script.

      The example is simplified. You would have it programmed to display
      various words, font sizes, etc. You can even provide your own .ttf
      (true type font) file for changing the font.

      But, like I said ... you may have to learn some PHP before using this
      with another script. But that's the way it's done.


      .

      Comment


      • #4
        Okay, thanks man.
        I guess I won't be able to do it.
        I am going to learn Javascript and then probably get a basic knowing of PHP.
        Would you recommend that is a wise decision to only know HTML, CSS and Javascript and then move to PHP?
        Check out my new forums: http://www.moderncoding.co.nr (:

        Strengths: HTML & CSS.


        Code:
        EpicFriends x = 
        players.getNearest(BestFriend);
        if (x != null) {
        x.interact("High Five" + x.getName());

        Comment


        • #5
          That sounds like a good plan.

          What kind of mod/admin posts are you talking about?
          Is it an existing CMS you are using?

          I'm wondering what you're working on ...



          .

          Comment


          • #6
            Originally posted by mlseim View Post
            That sounds like a good plan.

            What kind of mod/admin posts are you talking about?
            Is it an existing CMS you are using?

            I'm wondering what you're working on ...



            .
            Visit my site man, it's in my signature, I found a template off of the internet and I edited some of the html and css in it.
            I also found some javascripts off of a site and added them into it.
            Check it out if you want. (:
            Check out my new forums: http://www.moderncoding.co.nr (:

            Strengths: HTML & CSS.


            Code:
            EpicFriends x = 
            players.getNearest(BestFriend);
            if (x != null) {
            x.interact("High Five" + x.getName());

            Comment

            Working...
            X
            😀
            🥰
            🤢
            😎
            😡
            👍
            👎