Jump to content

2 columns


landlwoof

Recommended Posts

Hi, I am very novice to this was wondering if anyone could help me with the php code for putting the 'Purchase Now' button and item description (that is currently under the picture) to the right of the picture?

https://www.qualityexperts.ca/digital-products/website-starter-package

This is my code right now - very messy probably because I have screwed around so much with it 😞

<script src="<?php echo brilliantDirectories::getWebsiteUrl(); ?>/include/js/buy_digital_product.js?ver=6"></script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/6.11.2/sweetalert2.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/6.11.2/sweetalert2.min.js"></script>
<script src="https://js.stripe.com/v3/"></script>
<?php
$group = getMetaData("users_portfolio_groups",$group['group_id'],$group,$w);
$user = getUser($group['user_id'],$w);
$subscription = getSubscription($user['subscription_id'],$w);?>

<div id="post-content">

    <div class="row">

        <div class="col-md-12 vmargin">

            <h1 class="bold h2">
                <?php echo $group['group_name']; ?>
            </h1>

            <div class="clearfix"></div>

        </div>

        <div class="col-md-12">
            <div class="btn-sm fpad bg-primary no-radius-bottom">
                <span class="h4 nobmargin bold">
                    <?php echo displayPrice(str_replace(' ', '', $group['property_price'])); ?>
                </span>
                <div class="clearfix"></div>
            </div>
            <div class="clearfix"></div>
        </div>
    </div>

    <div class="clearfix"></div>

    <?php
    $photogroup = mysql(brilliantDirectories::getDatabaseConfiguration('database'),"SELECT
            *
        FROM
            `users_portfolio`
        WHERE
            `group_id` = '".$group[group_id]."'
        AND
            `file` != ''
        ORDER BY
            `order` ASC");
    $total = mysql_num_rows($photogroup);

    if ($total > 0) { ?>
    <div id="gallery-1" class="royalSlider rsDefault" style="width: 100%;">
        <?php
        while ($p = mysql_fetch_array($photogroup)) { ?>
            <a class="rsImg" data-rsbigimg="/<?php echo $w['photo_folder']; ?>/main/<?php echo $p['file']; ?>" href="/<?php echo $w['photo_folder']; ?>/main/<?php echo $p['file']; ?>">
                <?php if ($total > 1) { ?><img class="rsTmb" src="/<?php echo $w['photo_folder']; ?>/display/<?php echo $p['file']; ?>"><?php } ?>
                <?php
                if ($p['desc'] != "" || $p['title'] != "") { ?>
                    <figure class="rsCaption">
                        <div class="captionContent">
                            <h4 class='nomargin'><?php echo $p['title']; ?></h4>
                            <?php echo limitWords($p['desc'],160); ?>
                        </div>
                    </figure>
                    <?php
                } ?>
            </a>
            <?php
        } ?>
    </div>
    <div class="clearfix"></div>
    <?php
    } ?>

    <div class="row">
        <?php
        if ($subscription['receive_messages'] != 1 && $user['active'] == 2) { ?>
        
        <?php } ?>
        <div class="<?php if ($subscription['receive_messages'] != 1 && $user['active'] == 2) { ?>col-sm-6<?php } else { ?>col-sm-12<?php } ?> vmargin">
            [widget=Bootstrap Theme - Display - Digital Download - Buy Button]
        </div>
        <div class="clearfix"></div>
    </div>

    <?php
    if ($group['post_tags'] != "" || $group['group_desc'] != "" || $post['post_content'] !="") { ?>
    <div class="well">
        <?php
        // the post description
        if ($group['group_desc'] != "" || $post['post_content'] !="") {
            $description = $group['group_desc'] . $post['post_content'];
            // neutralizes http image path to work with https
            $description = str_replace('src="http://','src="//',$description);
            // adds nofollow to links based on user subscription
            if ($subscription['nofollow_links'] == "1") {
                $description = str_replace('href','rel="nofollow" href',$description);
            }
            $allowedTags = "<div><img><h1><h2><h3><h4><h5><h6><b><p><span><ul><ol><li><strong><font><em><br><iframe><u><hr><blockquote><tr><th><td><thead><table>";
            // allows links in post if website advanced setting about_live_links equals 1
            if (($w) && (array_key_exists("about_live_links", $w)) && ($w['about_live_links'] == 1)) {
                $allowedTags .= "<a>";
            }
                echo '<div class="the-post-description">' . strip_tags($description,$allowedTags) .'<div class="clearfix"></div></div>';
        } ?>

        <?php
        if ($group['post_tags'] != "") {
            if ($group['group_desc'] != "" || $post['post_content'] !="") { ?>
            <hr class=tmargin>
            <?php
            } ?>
        <div class="tags">
            <?php
            foreach(explode(",",$group['post_tags']) as $_ENV['tag']) {
                echo widget("Bootstrap Theme - Tag Link","",$w['website_id'],$w)." ";
            } ?>
        </div>
        <?php
        } ?>
    </div>
    <?php
    } ?>
</div>

Thank you

Edited by requinix
please use the Code <> button when posting code.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.