Advertisement:

Author Topic: Adding Attachment in twitter theme  (Read 15745 times)

silesius

  • Newbie
  • *
  • Posts: 9
Adding Attachment in twitter theme
« on: September 22, 2013, 12:07:42 am »
Hi,

I wonder how to implement attachment in item.php

I tried but not succesful, field attachment was showing but when I was sending message with attachement, only the text was sending.

Is there anybody who know what is the correct code??


The part of script when i want to implement attachment is:


<!-- item contact -->
        <div id="item-contact" class="modal hide item-contact">
            <form class="form-stacked" action="<?php echo osc_base_url(true) ; ?>" method="post" name="contact_form" id="contact_form" onsubmit="return doItemContact() ;">
                <input type="hidden" name="action" value="contact_post" />
                <input type="hidden" name="page" value="item" />
                <input type="hidden" name="id" value="<?php echo osc_item_id() ; ?>" />
                <div class="modal-header">
                    <a href="#" class="close">×</a>
                    <h3><?php _e('Contact publisher', 'twitter') ; ?></h3>
                </div>
                <div class="modal-body">
                    <?php osc_prepare_user_info() ; ?>
                    <div class="clearfix">
                        <label for="contact-yourName"><?php _e('Your name', 'twitter') ; ?></label>
                        <div class="input">
                            <input class="xlarge contact-yourName" id="contact-yourName" name="yourName" type="text" value="<?php echo osc_logged_user_name(); ?>">
                        </div>
                    </div>
                    <div class="clearfix">
                        <label for="contact-yourEmail"><?php _e('Your e-mail', 'twitter') ; ?></label>
                        <div class="input">
                            <input class="xlarge contact-yourEmail" id="contact-yourEmail" name="yourEmail" type="text" value="<?php echo osc_logged_user_email();?>">
                        </div>
                    </div>
                    <div class="clearfix">
                        <label for="contact-phoneNumber"><?php _e('Phone number', 'twitter') ; ?></label>
                        <div class="input">
                            <input class="xlarge contact-phoneNumber" id="contact-phoneNumber" name="phoneNumber" type="text" value="">
                        </div>
                    </div>
                    <div class="clearfix">
                        <label for="contact-message"><?php _e('Message', 'twitter') ; ?></label>
                        <div class="input">
                            <textarea class="xlarge contact-message" id="contact-message" name="message" rows="6"></textarea>
                        </div>
                    </div>
                    <?php /*
                    <div class="clearfix">
                        <?php osc_show_recaptcha(); ?>
                    </div>
                    */ ?>
                </div>
                <div class="modal-footer">
                    <button class="btn primary" type="submit"><?php _e('Send', 'twitter') ; ?></button>
                    <a class="btn item-contact-button-cancel" href="javascript://"><?php _e('Cancel', 'twitter') ; ?></a>
                </div>
            </form>
        </div>
        <!-- item contact end -->



garciademarina

  • Administrator
  • Hero Member
  • *****
  • Posts: 974
Re: Adding Attachment in twitter theme
« Reply #1 on: October 01, 2013, 02:12:01 pm »
Hi @silesius,

We will add this feature to twitter theme asap, but in meantime you can do this changes:

Fisrt, <form> element

add this:

Code: [Select]
<form <?php if( osc_item_attachment() ) { ?>enctype="multipart/form-data"<?php ?> ....
Second where you want to add input file add this code:

<?php ContactForm::your_attachment() ; ?>

Regards

garciademarina

  • Administrator
  • Hero Member
  • *****
  • Posts: 974
Re: Adding Attachment in twitter theme
« Reply #2 on: October 03, 2013, 02:06:22 pm »
Hi @silesius,

Twitter theme has been updated!

apoorvkapil10

  • Newbie
  • *
  • Posts: 20
Re: Adding Attachment in twitter theme
« Reply #3 on: September 18, 2014, 08:40:38 pm »
Hello garciademarina ,

everything working perfectly , i just want to upload that Attachment(resume) in a specific folder for admin...could you help me ouut to do this...?? is it possible ...????

Adyyda

  • Sr. Member
  • ****
  • Posts: 435
Re: Adding Attachment in twitter theme
« Reply #4 on: April 25, 2016, 11:27:08 pm »
Hi @silesius,

Twitter theme has been updated!

Hello. Are you going to fix the theme to the level of modern or bender?
Right now error messages do not show, messages from plugins do not show as well, in user account there is issues because we don't have certain files.