vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Portal Software - [Chris] Classifieds (https://vborg.vbsupport.ru/showthread.php?t=297847)

Christos Teriakis 05-20-2013 02:33 PM

Quote:

Originally Posted by Rich (Post 2423127)
Chris, my classifieds "Similar Classifieds" don't link to the ad. They link to my sites homepage, regardless as to what ad I am viewing. Any thoughts?

I also have a stupid question, how/where do I edit an existing ad that someone else posted?

1.- I'll post an update later today fixing the Similar Ads
2.- You can't edit someone's else Classified. Is not a thread post where editing a text has no sense. Here we're talking about money. What if you change (even by mistake) the price from $1,000 to $100 and someone buys it? Only the owner can edit the classified. The only that you can is to reject the classified. Every time that the seller changes something it goes for approval. So if you don't like you reject it.

Chris

Disco_Dave 05-20-2013 02:44 PM

Quote:

Originally Posted by Christos Teriakis (Post 2423125)
Hi Dave,

Without any meaning to appear smarty, those are calling Forum sidabar blocks. Widgets are reffering to CMS.
Yes, I can release something like this for forum sidebar, but tomorrow. Today I'm very busy.

Christos


No worries.... I wouldn't be totally up to speed with all the vBulletin terminology ;) No rush at all!

Rich 05-20-2013 02:44 PM

Well I was looking for a way to delete an existing ad and can't and I believe that is an issue. I also don't allow people to use the classifieds to market their website and would like the ability to edit an ad to remove things like that when I encounter them. The deletion of ads is actually pretty important though, at least for me. lol

Christos Teriakis 05-20-2013 05:10 PM

Quote:

Originally Posted by Rich (Post 2423147)
Well I was looking for a way to delete an existing ad and can't and I believe that is an issue. I also don't allow people to use the classifieds to market their website and would like the ability to edit an ad to remove things like that when I encounter them. The deletion of ads is actually pretty important though, at least for me. lol

As I said you can delete them (unless if you've approve OFF). In the Menu Moderate Classifieds-> Approve Classifieds you can see all ads that are newly post or edited. You can click on the title to see the full ad (like a visitor sees an Ad). If you find something bad you select "Reject" from the action droplist on the right and the ad will delete. User will also get a message that his ad has rejected as does not meets the site's rules.

nhawk 05-20-2013 05:19 PM

Whenever a search engine spider uses the classifieds.php?do=searchresults link, a database error happens...

Invalid SQL:
SELECT * FROM classifieds_items WHERE active=1 ORDER BY dateline DESC;

MySQL Error : Unknown column 'dateline' in 'order clause'
Error Number : 1054
Request Date : Monday, May 20th 2013 @ 04:35:50 PM
Error Date : Monday, May 20th 2013 @ 04:35:50 PM
Script : http://www.xxx.com/classifieds.php?do=searchresults
Referrer :
IP Address : 66.249.73.229
Username : Unregistered
Classname : vB_Database
MySQL Version :

Perhaps some default values for a search submitted without any values are needed.

Christos Teriakis 05-20-2013 05:47 PM

Classifieds version 1.8.0 released. In this version:
  1. There is code to show Latest Classifieds in Forum sidebar and not only in CMS widgets
  2. For easier use (as many users have found difficulties to use it), the Terms text is not in a text anymore but is in Classifieds General Settings
  3. Fixed a bug of missing link in Similar ads
  4. Improved RTL support by using the correct arrow icons
  5. I found a bug in extra fields (type checkbox) which I fixed it.
To upgrade:
  1. Upload all files
  2. Import product-classifieds.xml
  3. For Forum sidebar block read instructions in main post here or in the installation.txt in the zip file. Demo at:http://www.christeris.net/dev42/forum.php
Christos Teriakis
(aka ChrisTERiS)

Christos Teriakis 05-20-2013 05:53 PM

Quote:

Originally Posted by nhawk (Post 2423204)
Whenever a search engine spider uses the classifieds.php?do=searchresults link, a database error happens...

Invalid SQL:
SELECT * FROM classifieds_items WHERE active=1 ORDER BY dateline DESC;

MySQL Error : Unknown column 'dateline' in 'order clause'
Error Number : 1054
Request Date : Monday, May 20th 2013 @ 04:35:50 PM
Error Date : Monday, May 20th 2013 @ 04:35:50 PM
Script : http://www.xxx.com/classifieds.php?do=searchresults
Referrer :
IP Address : 66.249.73.229
Username : Unregistered
Classname : vB_Database
MySQL Version :

Perhaps some default values for a search submitted without any values are needed.

Thank you. File Classifieds.php, Lines: 1250-1253:
Replace:
Code:

if (empty($orderby1))
{
    $orderby1 = 'dateline';
}

With:
Code:

if (empty($orderby1))
{
    $orderby1 = 'starts';
}


sadiq6210 05-21-2013 05:22 AM

Thanks Chris

Quote:

Originally Posted by Christos Teriakis (Post 2423214)
Classifieds version 1.8.0 released. In this version:
  1. For easier use (as many users have found difficulties to use it), the Terms text is not in a text anymore but is in Classifieds General Settings

I replaced all the files and I imported the xml product but still I am getting the old terms which is in term.php ! I tried to write our terms in admincp but nothing appeared

In "add item" page, I can see only this inside the terms box
Place your rules here.................

Which is the same text in (terms.php) and this is not what I wrote in admincp.

Christos Teriakis 05-21-2013 05:34 AM

Quote:

Originally Posted by sadiq6210 (Post 2423280)
Thanks Chris



I replaced all the files and I imported the xml product but still I am getting the old terms which is in term.php ! I tried to write our terms in admincp but nothing appeared

In "add item" page, I can see only this inside the terms box
Place your rules here.................

Which is the same text in (terms.php) and this is not what I wrote in admincp.

Have you manually edited the template classifieds_addedit_item ? If yes revert it, otherwise you'll can't get the new changes. Also clear system cache and browser cache.

sadiq6210 05-21-2013 05:40 AM

Quote:

Originally Posted by Christos Teriakis (Post 2423282)
Have you manually edited the template classifieds_addedit_item ? If yes revert it, otherwise you'll can't get the new changes. Also clear system cache and browser cache.

I already reverted, this is the template

Code:

<script type="text/javascript" src="clientscript/vbulletin-editor.js?v={vb:raw vboptions.simpleversion}"></script>
<link rel="stylesheet" type="text/css" href="{vb:var vbcsspath}editor.css" />
<link rel="stylesheet" type="text/css" href="{vb:var vbcsspath}bbcode.css" />
<script src="christeris/classifieds/includes/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
    function validateForm_vbform()
    {
        if(document.forms["vbform"].title.value.length == 0) {
            alert('{vb:var vbphrase.classifieds_error_title}');
            return false;
        }
        if(document.forms["vbform"].location.value.length == 0) {
            alert('{vb:var vbphrase.classifieds_error_location}');
            return false;
        }
        if(document.forms["vbform"].categoryid != undefined){
            if(!isNaN(document.forms["vbform"].categoryid.value) == 0) {
                alert('{vb:var vbphrase.classifieds_error_category_number}');
                return false;
            }else if(document.forms["vbform"].categoryid.value ==0){
                alert("{vb:var vbphrase.classifieds_error_category_zero}");
                return false;
            }
        }
        if(document.forms["vbform"].days != undefined){
            if(!isNaN(document.forms["vbform"].days.value) == 0) {
                alert('{vb:var vbphrase.classifieds_error_days_number}');
                return false;
            }else if(document.forms["vbform"].days.value ==0){
                alert("{vb:var vbphrase.classifieds_error_days_zero}");
                return false;
            }
        }
        return true;
    }
</script>
<script type="text/javascript">
    function AgreeToRules()
    {
            if(document.getElementById('rulesagreement').checked)
            {
                    document.getElementById('agree2rules').style.display = "block";
            }
            else
            {
                    document.getElementById('agree2rules').style.display = "none";
            }
    }
</script>
<script type="text/javascript">
        function showstuff(boxid){
                document.getElementById(boxid).style.visibility="visible";
                document.getElementById(boxid).style.height="auto";
        }
        function hidestuff(boxid){
                document.getElementById(boxid).style.visibility="hidden";
                document.getElementById(boxid).style.height="0px";
        }
</script>
<script type="text/javascript">
        function CheckImageExt(fld)
        {
                if (fld.value != '')
                {
                        var image_ext = getFileExtension(fld.value);
                        var valid_images = new Array("jpg","jpeg","gif","png","JPG","JPEG","GIF","PNG");
                        if (valid_images.indexOf(image_ext) > -1)
                        {
                                return true;
                        }
                        else
                        {
                                alert('You can upload only .gif, .jpg, .jpeg, .png files.');
                                fld.value = '';
                                fld.select();
                                fld.focus();
                                return false;
                        }
                }
                else
                {
                        return true;
                }
        }
</script>
<script type="text/javascript">
        function getFileExtension(filename)
        {
                return filename.split('.').pop();
        }
</script>
<form class="block vbform" action="classifieds_usercp.php?do=saveupdate" method="post" enctype="multipart/form-data" name="vbform" onsubmit="return vB_Editor['{vb:raw editorid}'].prepare_submit(0, {vb:raw vboptions.postminchars})">
<vb:if condition="$editmode == 0">
        <vb:if condition="$adtype == 1">
                <h2 class="blockhead"><b>{vb:var vbphrase.classifieds_new_forsale}</b></h2>
        </vb:if>
        <vb:if condition="$adtype == 2">
                <h2 class="blockhead"><b>{vb:var vbphrase.classifieds_new_wanted}</b></h2>
        </vb:if>
        <vb:if condition="$adtype == 3">
                <h2 class="blockhead"><b>{vb:var vbphrase.classifieds_new_fortrade}</b></h2>
        </vb:if>
        <vb:if condition="$adtype == 4">
                <h2 class="blockhead"><b>{vb:var vbphrase.classifieds_new_freeoffer}</b></h2>
        </vb:if>
<vb:else />
        <h2 class="blockhead"><b>{vb:var vbphrase.classifieds_edit} {vb:var vbphrase.classifieds_classified}</b></h2>
</vb:if>
<div class="blockbody formcontrols settings_form_border">
        <h3 class="blocksubhead">{vb:var vbphrase.classifieds_general_info}</h3>
        <div class="section">
                <div class="blockrow">
                        <label for="category">{vb:var vbphrase.classifieds_category}:</label>
                        <div class="rightcol">
                                {vb:raw selectcategory}
                                <p class="description">{vb:var vbphrase.classifieds_h_category}</p>
                        </div>
                </div>
                <div class="blockrow">
                        <label for="title">{vb:var vbphrase.classifieds_title}:</label>
                        <div class="rightcol">
                                <input type="text" name="title" style="width:100%;" value="{vb:raw title}">
                                <p class="description">{vb:var vbphrase.classifieds_h_title}</p>
                        </div>
                </div>
        <vb:if condition="$adtype==2">
                    <div class="blockrow">
                            <label for="location">{vb:var vbphrase.classifieds_your_location}</label>
                            <div class="rightcol">
                                    <input type="text" name="location"  style="width:100%;" value="{vb:raw location}" />
                                <p class="description">{vb:var vbphrase.classifieds_h_your_location}</p>
                            </div>
                    </div>
        <vb:else />
                    <div class="blockrow">
                            <label for="location">{vb:var vbphrase.classifieds_location}</label>
                            <div class="rightcol">
                                    <input type="text" name="location"  style="width:100%;" value="{vb:raw location}" />
                                <p class="description">{vb:var vbphrase.classifieds_h_location}</p>
                            </div>
                    </div>
        </vb:if>
            <vb:if condition="$adtype != 4">
                        <vb:if condition="$adtype==1">
                                <div class="blockrow">
                                    <label for="price">{vb:var vbphrase.classifieds_ask_price}</label>
                                    <div class="rightcol">
                                            <input type="text" name="price"  style="width:50%;" value="{vb:raw price}" />&nbsp;{vb:raw vboptions.classifieds_cursuf}
                                <p class="description">{vb:var vbphrase.classifieds_in} {vb:raw vboptions.classifieds_cursuf} {vb:var vbphrase.classifieds_h_price}</p>
                    </div>
                </div>
                        </vb:if>
                        <vb:if condition="$adtype==2">
                                <div class="blockrow">
                                        <label for="price">{vb:var vbphrase.classifieds_offer_price}</label>
                                        <div class="rightcol">
                                                <input type="text" name="price"  style="width:50%;" value="{vb:raw price}" />&nbsp;{vb:raw vboptions.classifieds_cursuf}
                                <p class="description">{vb:var vbphrase.classifieds_in} {vb:raw vboptions.classifieds_cursuf} {vb:var vbphrase.classifieds_h_price}</p>
                                        </div>
                                </div>
                        </vb:if>
                        <vb:if condition="$adtype==3">
                                <div class="blockrow">
                                        <label for="price">{vb:var vbphrase.classifieds_trade_with}</label>
                                        <div class="rightcol">
                                                <input type="text" name="tradewith"  style="width:100%;" value="{vb:raw tradewith}" />
                                <p class="description">{vb:var vbphrase.classifieds_h_trade_with}</p>
                                        </div>
                                </div>
                        </vb:if>
        </vb:if>
        <div class="blockrow">
                <label for="days">{vb:var vbphrase.classifieds_expires_in}:</label>
                <div class="rightcol">
                <input type="text" name="days" value="{vb:raw days}" style="width:50%;">&nbsp;{vb:var vbphrase.classifieds_days}
                        <p class="description">{vb:var vbphrase.classifieds_h_days} ({vb:var vbphrase.classifieds_max}: {vb:raw maxdays} {vb:var vbphrase.classifieds_days_small})</p>
                </div>
        </div>
                <div class="blockrow">
                        <label for="flagreserved">{vb:var vbphrase.classifieds_reserve_buynow}</label>
                        <div class="rightcol">
                                <input type="radio" name="flagreserved" value="1" <vb:if condition="$flagreserved==1">checked=checked</vb:if> />&nbsp;{vb:var vbphrase.classifieds_yes}
                &nbsp;&nbsp;
                                <input type="radio" name="flagreserved" value="0" <vb:if condition="$flagreserved==0">checked=checked</vb:if> />&nbsp;{vb:var vbphrase.classifieds_no}
                                <p class="description">{vb:var vbphrase.classifieds_h_reserve_buynow}</p>
                        </div>
                </div>               
    </div>
        <h3 class="blocksubhead">{vb:var vbphrase.classifieds_classified_details}</h3>
                                        <div class="wysiwyg_block">
                                                <div class="blockbody formcontrols">
                                                        <div class="blockrow">
                                                                {vb:raw messagearea}
                                                        </div>
                                                </div>
                                        </div>
        <h3 class="blocksubhead">{vb:var vbphrase.classifieds_other_info}</h3>
        <div class="section">
                <div class="blockrow">
                        <label for="katastasi">{vb:var vbphrase.classifieds_katastasi}</label>
                        <div class="rightcol">
                <select name="katastasi" size="1" style="width:100%;">
                <option value="0"<vb:if condition="$katastasi == 0"> selected="selected"</vb:if>>{vb:var vbphrase.classifieds_select}</option>
                <option value="6"<vb:if condition="$katastasi == 6"> selected="selected"</vb:if>>{vb:var vbphrase.classifieds_rating_6}</option>
                <option value="5"<vb:if condition="$katastasi == 5"> selected="selected"</vb:if>>{vb:var vbphrase.classifieds_rating_5}</option>
                <option value="4"<vb:if condition="$katastasi == 4"> selected="selected"</vb:if>>{vb:var vbphrase.classifieds_rating_4}</option>
                <option value="3"<vb:if condition="$katastasi == 3"> selected="selected"</vb:if>>{vb:var vbphrase.classifieds_rating_3}</option>
                <option value="2"<vb:if condition="$katastasi == 2"> selected="selected"</vb:if>>{vb:var vbphrase.classifieds_rating_2}</option>
                <option value="1"<vb:if condition="$katastasi == 1"> selected="selected"</vb:if>>{vb:var vbphrase.classifieds_rating_1}</option>
                                </select>
                                <p class="description">{vb:var vbphrase.classifieds_h_katastasi}</p>
                        </div>
                </div>
                <div class="blockrow">
                        <label for="sellertype">{vb:var vbphrase.classifieds_youare}</label>
                        <div class="rightcol">
                                <input type="radio" name="sellertype" value="1" <vb:if condition="$sellertype==1">checked=checked</vb:if> />&nbsp;{vb:var vbphrase.classifieds_individual}
                &nbsp;&nbsp;
                                <input type="radio" name="sellertype" value="2" <vb:if condition="$sellertype==2">checked=checked</vb:if> />&nbsp;{vb:var vbphrase.classifieds_storeowner}
                                <p class="description">{vb:var vbphrase.classifieds_h_sellertype}</p>
                        </div>
                </div>
                <div class="blockrow">
                        <label for="keywords">{vb:var vbphrase.classifieds_keywords}:</label>
                        <div class="rightcol">
                                <input type="text" name="keywords" style="width:100%;" value="{vb:raw keywords}">
                                <p class="description">{vb:var vbphrase.classifieds_h_keywords}</p>
                        </div>
                </div>
        <div class="blockrow">
                <label for="shipping">{vb:var vbphrase.classifieds_shipping}:</label>
                <div class="rightcol">
                <input type="text" name="shipping" value="{vb:raw shipping}" style="width:100%;">
                        <p class="description">{vb:var vbphrase.classifieds_h_shipping}</p>
                </div>
        </div>
        <div class="blockrow">
                <label for="payment">{vb:var vbphrase.classifieds_payment}:</label>
                <div class="rightcol">
                <input type="text" name="payment" value="{vb:raw payment}" style="width:100%;">
                        <p class="description">{vb:var vbphrase.classifieds_h_payment}</p>
                </div>
        </div>
                {vb:raw extrafields}
        </div>
        <h3 class="blocksubhead">{vb:var vbphrase.classifieds_main_photo}</h3>
        <div class="section">
                <div class="blockrow">
                        <label for="tb_mainphoto">{vb:var vbphrase.classifieds_select_photo}</label>
                        <div class="rightcol">
                                <input type="file" name="logo" id="logo" onblur="return CheckImageExt(this)" size="30" />
                                <p class="description">{vb:var vbphrase.classifieds_h_main_photo}</p>
                        </div>
                </div>
                <vb:if condition="!empty($oldlogo)">
                        <div class="blockrow">
                                <label for="tb_currentphoto">{vb:var vbphrase.classifieds_current_photo}</label>
                                <div class="rightcol">
                                        <a href="christeris/classifieds/photos/{vb:raw oldlogo}" rel="thumbnail">
                                        <img border="0" src="christeris/classifieds/photos/thumbs/{vb:raw oldlogo}" align="{vb:stylevar left}" /></a>&nbsp;
                                        <input type="checkbox" name="removelogo" value="1">&nbsp;{vb:var vbphrase.classifieds_remove_photo}
                                </div>
                        </div>
                </vb:if>
        </div>
        <h3 class="blocksubhead">{vb:var vbphrase.classifieds_additional_photos}</h3>
        <div class="section">
                <vb:if condition="$maxphotos>0">
                        {vb:raw html_photos}
                <vb:else />
                        <div class="blockrow" align="center">
                                {vb:var vbphrase.classifieds_no_more_photos}
                        </div>
                </vb:if>
        </div>
        <vb:if condition="$totalphotos>0">
                <h3 class="blocksubhead">{vb:var vbphrase.classifieds_photo_gallery}</h3>
                <div class="section">
                    {vb:raw item_gallery}
                </div>
        </vb:if>
        <vb:if condition="!empty($vboptions['classifieds_terms'])">
                <h3 class="blocksubhead">{vb:var vbphrase.classifieds_terms}</h3>
                <div class="section">
                        <div class="blockrow">
                                <iframe name="rules" src="christeris/classifieds/includes/terms.php" width="100%" height="100" frameborder="1" marginwidth="5" marginheight="5" align="{vb:stylevar left}" scrolling="auto"></iframe>
                        </div>
                        <div class="blockrow">
                                <input type="checkbox" onclick="return AgreeToRules();" name="rulesagreement" id="rulesagreement" value="1">
                                &nbsp;<b>{vb:var vbphrase.classifieds_agree_rules}</b>
                        </div>
                </div>
        </vb:if>
</div>
<vb:if condition="!empty($vboptions['classifieds_terms'])">
        <div id="agree2rules" style="display:none;">
</vb:if>
    <div class="blockfoot actionbuttons settings_form_border">
                <div class="group">
                        <vb:if condition="$vbulletin->userinfo['permissions']['classifieds'] & $vbulletin->bf_ugp['classifieds']['moderate']">
                                <input type="submit" class="button" name="sbutton" value="{vb:var vbphrase.classifieds_approve}" onclick="return validateForm_vbform()">
                                &nbsp;&nbsp;
                                <a class="button" href="classifieds_usercp.php?do=deleteitem&itemid={vb:raw id}">
                                <b>{vb:var vbphrase.classifieds_delete}</a></b>
                &nbsp;&nbsp;
                        <vb:else />
                                <input type="submit" class="button" name="sbutton" value="{vb:var vbphrase.classifieds_submit}" onclick="return validateForm_vbform()">
                        </vb:if>
                        <input type="reset" class="button" value="{vb:var vbphrase.classifieds_reset_fields}" tabindex="1" accesskey="r" />
                        <input type="hidden" name="itemid" value="{vb:raw id}" />
                        <input type="hidden" name="adtype" value="{vb:raw adtype}" />
                        <input type="hidden" name="userid" value="{vb:raw userid}" />
                        <input type="hidden" name="urlid" value="{vb:raw urlid}" />
                        <input type="hidden" name="starts" value="{vb:raw starts}" />
                        <input type="hidden" name="oldlogo" value="{vb:raw oldlogo}" />
                        <input type="hidden" name="editmode" value="{vb:raw editmode}" />
                        <input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
                        <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
                </div>
        </div>
<vb:if condition="!empty($vboptions['classifieds_terms'])">       
        </div>
</vb:if>
</form>

I tried from another browser and same problem, still it reads from term.php not from the admincp. I feel there is something missing in the code. :)


All times are GMT. The time now is 09:08 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01582 seconds
  • Memory Usage 1,891KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete