Forum Replies Created

Viewing 5 replies - 361 through 365 (of 365 total)
  • Forum: Requests and Feedback
    In reply to: Image class
    Thread Starter Manish

    (@nims)

    Since I didnt get any response, I thought of playing around with some PHP code myself. ( I am using WP 2.1 )
    To some extent I managed to satisfy myself by making “Send to editor” button automatically add class=”imgleft” to the img tag it inserts in the post.

    To do this, I opened the upload-js.php file ( its in wp-admin folder ) and inserted class=’imgleft’ ( note single quotes ) in the 3 <img tags just before they close i.e />
    Here is how they looked after modifications.
    h += “<img src='” + ( this.currentImage.thumb ? this.currentImage.thumb : this.currentImage.src ) + “‘ alt='” + this.currentImage.title + “‘ width='” + this.currentImage.width + “‘ height='” + this.currentImage.height + “‘ class=’imgleft’ />”;

    h += “<img src='” + ( this.currentImage.thumb ? this.currentImage.thumb : this.currentImage.src ) + “‘ alt='” + this.currentImage.title + “‘ width='” + this.currentImage.width + “‘ height='” + this.currentImage.height + “‘ class=’imgleft’ />”;

    h += “<img src='” + ( ‘thumb’ == display ? ( this.currentImage.thumbBase + this.currentImage.thumb ) : ( this.currentImage.srcBase + this.currentImage.src ) ) + “‘ alt='” + this.currentImage.title + “‘ class=’imgleft’ />”;

    Now add class imgleft in the style.css file ( or whatever css file u r using )

    Upload it to the proper folders and thats it. Do make backup of these files before making any changes.

    Now when you insert an image by clicking “Send to Editor” button you will see class=”imgleft” attribute already added.

    Now if someone can help me in adding an option (radio buttons ) to select the class I want to add in this tag

    Even I am facing similar problem with 2.1 Are the moderators working on this ?

    Forum: Requests and Feedback
    In reply to: Image class
    Thread Starter Manish

    (@nims)

    Thanks for the links but what I wanted to convey was something different. I understand we can have different classes in style.css and call them in the img tags whereever required. But that has to be done manually, editing each img tag in the post after pressing “Send it to Editor” button and writing class=”someclass” in them.

    I just wanted a simple addon so that this option can appear in the iframe where we select the thumbnail option etc. foe the image. So that when the button “send to editor” is pressed we have an img tag with class attribute already displayed. The options can be as described in my first message.

    Forum: Fixing WordPress
    In reply to: Messed up
    Thread Starter Manish

    (@nims)

    whooami sorry I was actually searching with wrong keywords. Thanks for the help !!! Problem solved my changing wp-options in Mysql. Thanks 🙂

    Hi,

    I am looking for a coder who can customize WP as per my requirement. Pls post a message here with contact details.

    regards,

    Maky.

Viewing 5 replies - 361 through 365 (of 365 total)