How add new html block

How do i add new html_block Builers/ Page Builerand what all need to do so that forks fine?

I want put member contact info where see Name, Phone number and emai laddress so what all need to do?

Thank you.

Quote · 23 Jan 2014

I am guessing you want this on the profile page.

To do this, you need to make a few changes to the profile view builder, not the page builders.

Go to builders and click on Profile Fields.  When it finishes loading, click on view profile.  Now remember, you have three views, one for guests, one for members, one for admins; you have to do it for each one you want to be able to view; if you don't change it for your admin view, then if you are logged on as admin, you won't see it.

You make a new top section, say Contact Info.  Then under that top section you drag the name, email, telephone number, etc.  This will automatically make a block on the profile page that has that information.  Now of course if you have the yellow privacy keys in place members can choose to hide the block.

Geeks, making the world a better place
Quote · 23 Jan 2014

 

I am guessing you want this on the profile page.

To do this, you need to make a few changes to the profile view builder, not the page builders.

Go to builders and click on Profile Fields.  When it finishes loading, click on view profile.  Now remember, you have three views, one for guests, one for members, one for admins; you have to do it for each one you want to be able to view; if you don't change it for your admin view, then if you are logged on as admin, you won't see it.

You make a new top section, say Contact Info.  Then under that top section you drag the name, email, telephone number, etc.  This will automatically make a block on the profile page that has that information.  Now of course if you have the yellow privacy keys in place members can choose to hide the block.

 I want that ads view page like you see pictures

modern.png · 604.1K · 149 views
Quote · 23 Jan 2014

You need to mention what page you want this to appear on.  An HTML block is not going to work, you will need to add a PHP block with the proper code to retrieve the information.

Geeks, making the world a better place
Quote · 23 Jan 2014

 

You need to mention what page you want this to appear on.  An HTML block is not going to work, you will need to add a PHP block with the proper code to retrieve the information.

 check that photo what i send, that is ads http://myyntinurkka.com/ads/entry/Kenwood-leip%C3%A4kone

Quote · 23 Jan 2014

Puilders/Pages Builer/ and pages ads view and collumn 2 there i want that

jeahhhh.jpg · 517.7K · 150 views
Quote · 23 Jan 2014

there are a few things you would need to do

First - add the fields to the form. Go to BxAdsModule.php, starting around line 889, you will see this:

 

     $aForm = array(
            'form_attrs' => array(
                'name' => 'CreateAdsForm',
                'action' => $sAdsAddLink,
                'method' => 'post',
                'enctype' => 'multipart/form-data',
            ),
            'params' => array (
                'db' => array(
                    'table' => $this->_oConfig->sSQLPostsTable,
                    'key' => 'ID',
                    'submit_name' => 'add_button',
                ),
            ),
            'inputs' => array(
                'CustomCategories' => array(
                    'caption' => _t('_Category'),
                    'type' => 'custom',
                    'name' => 'CustomCategories',
                    'content' => $sCustomCategories
                ),
                'Subject' => array(
                    'type' => 'text',
                    'name' => 'Subject',
                    'caption' => _t('_Caption'),
                    'required' => true,
                    'checker' => array (
                        'func' => 'length',
                        'params' => array(3,255),
                        'error' => _t('_bx_ads_Caption_error'),
                    ),
                    'db' => array (
                        'pass' => 'Xss',
                    ),
                ),
                'LifeTime' => array(
                    'type' => 'select',
                    'name' => 'LifeTime',
                    'caption' => _t('_bx_ads_Life_Time') . " ({$sDaysC})",
                    'info' => $sMaxedString,
                    'value' => $iMaxLt,
                    'values' => $aLifeTimeValues,
                    'required' => true,
                    'checker' => array (
                        'func' => 'length',
                        'params' => array(1,3),
                        'error' => _t('_Error Occured'),
                    ),
                    'db' => array (
                        'pass' => 'Int',
                    ),
                ),
                'Tags' => array(
                    'type' => 'text',
                    'name' => 'Tags',
                    'caption' => _t('_Tags'),
                    'info' => _t('_sys_tags_note'),
                    'required' => false,
                    'db' => array (
                        'pass' => 'Xss',
                    ),
                ),
                'Message' => array(
                    'type' => 'textarea',
                    'name' => 'Message',
                    'caption' => _t('_bx_ads_post_text'),
                    'required' => true,
                    'html' => 2,
                    'checker' => array (
                        'func' => 'length',
                        'params' => array(3,65535),
                        'error' => _t('_bx_ads_Text_error'),
                    ),
                    'db' => array (
                        'pass' => 'XssHtml',
                    ),
                ),
                'Country' => array(
                    'type' => 'select',
                    'name' => 'Country',
                    'caption' => _t('_bx_ads_caption_country'),
                    'values' => $aCountries,
                    'value' => $sCountry,
                    'required' => true,
                    'checker' => array (
                        'func' => 'preg',
                        'params' => array('/^[a-zA-Z]{2}$/'),
                        'error' => _t ('_bx_ads_err_country'),
                    ),
                    'db' => array (
                        'pass' => 'Preg',
                        'params' => array('/([a-zA-Z]{2})/'),
                    ),
                ),
                'City' => array(
                    'type' => 'text',
                    'name' => 'City',
                    'caption' => _t('_bx_ads_caption_city'),
                    'required' => true,
                    'value' => $sCity,
                    'checker' => array (
                        'func' => 'length',
                        'params' => array(3,50),
                        'error' => _t ('_bx_ads_err_city'),
                    ),
                    'db' => array (
                        'pass' => 'Xss',
                    ),
                ),
                'File' => array(
                    'type' => 'file',
                    'name' => 'userfile[]',
                    'caption' => _t('_associated_image'),
                    'attrs' => array(
                        'multiplyable' => 'true',
                    )
                ),
                'ExistedImages' => array(
                    'type' => 'hidden',
                ),
                'allowView' => $aAllowView,
                'allowRate' => $aAllowRate,
                'allowComment' => $aAllowComment,
                'add_button' => array(
                    'type' => 'submit',
                    'name' => 'add_button',
                    'value' => $sNewAdC,
                ),
            ),
        );

 

you will need to add the new fields to this section, so something like this should be the end result (section in blue is the new fields):

 

     $aForm = array(
            'form_attrs' => array(
                'name' => 'CreateAdsForm',
                'action' => $sAdsAddLink,
                'method' => 'post',
                'enctype' => 'multipart/form-data',
            ),
            'params' => array (
                'db' => array(
                    'table' => $this->_oConfig->sSQLPostsTable,
                    'key' => 'ID',
                    'submit_name' => 'add_button',
                ),
            ),
            'inputs' => array(
                'CustomCategories' => array(
                    'caption' => _t('_Category'),
                    'type' => 'custom',
                    'name' => 'CustomCategories',
                    'content' => $sCustomCategories
                ),
                'Subject' => array(
                    'type' => 'text',
                    'name' => 'Subject',
                    'caption' => _t('_Caption'),
                    'required' => true,
                    'checker' => array (
                        'func' => 'length',
                        'params' => array(3,255),
                        'error' => _t('_bx_ads_Caption_error'),
                    ),
                    'db' => array (
                        'pass' => 'Xss',
                    ),
                ),
                'LifeTime' => array(
                    'type' => 'select',
                    'name' => 'LifeTime',
                    'caption' => _t('_bx_ads_Life_Time') . " ({$sDaysC})",
                    'info' => $sMaxedString,
                    'value' => $iMaxLt,
                    'values' => $aLifeTimeValues,
                    'required' => true,
                    'checker' => array (
                        'func' => 'length',
                        'params' => array(1,3),
                        'error' => _t('_Error Occured'),
                    ),
                    'db' => array (
                        'pass' => 'Int',
                    ),
                ),
                'Tags' => array(
                    'type' => 'text',
                    'name' => 'Tags',
                    'caption' => _t('_Tags'),
                    'info' => _t('_sys_tags_note'),
                    'required' => false,
                    'db' => array (
                        'pass' => 'Xss',
                    ),
                ),
                'Message' => array(
                    'type' => 'textarea',
                    'name' => 'Message',
                    'caption' => _t('_bx_ads_post_text'),
                    'required' => true,
                    'html' => 2,
                    'checker' => array (
                        'func' => 'length',
                        'params' => array(3,65535),
                        'error' => _t('_bx_ads_Text_error'),
                    ),
                    'db' => array (
                        'pass' => 'XssHtml',
                    ),
                ),
                'Country' => array(
                    'type' => 'select',
                    'name' => 'Country',
                    'caption' => _t('_bx_ads_caption_country'),
                    'values' => $aCountries,
                    'value' => $sCountry,
                    'required' => true,
                    'checker' => array (
                        'func' => 'preg',
                        'params' => array('/^[a-zA-Z]{2}$/'),
                        'error' => _t ('_bx_ads_err_country'),
                    ),
                    'db' => array (
                        'pass' => 'Preg',
                        'params' => array('/([a-zA-Z]{2})/'),
                    ),
                ),
                'City' => array(
                    'type' => 'text',
                    'name' => 'City',
                    'caption' => _t('_bx_ads_caption_city'),
                    'required' => true,
                    'value' => $sCity,
                    'checker' => array (
                        'func' => 'length',
                        'params' => array(3,50),
                        'error' => _t ('_bx_ads_err_city'),
                    ),
                    'db' => array (
                        'pass' => 'Xss',
                    ),
                ),
                'Name' => array(
                    'type' => 'text',
                    'name' => 'Name',
                    'caption' => _t('_bx_ads_caption_name'),
                    'required' => true,
                    'value' => getNickName((int)$_COOKIE['memberID']),
                    'db' => array (
                        'pass' => 'Xss',
                    ),
                ),
                'Email' => array(
                    'type' => 'text',
                    'name' => 'Email',
                    'caption' => _t('_bx_ads_caption_email'),
                    'db' => array (
                        'pass' => 'Xss',
                    ),
                ),
                'Phone' => array(
                    'type' => 'text',
                    'name' => 'Phone',
                    'caption' => _t('_bx_ads_caption_phone'),
                    'db' => array (
                        'pass' => 'Xss',
                    ),
                ),
                'File' => array(
                    'type' => 'file',
                    'name' => 'userfile[]',
                    'caption' => _t('_associated_image'),
                    'attrs' => array(
                        'multiplyable' => 'true',
                    )
                ),
                'ExistedImages' => array(
                    'type' => 'hidden',
                ),
                'allowView' => $aAllowView,
                'allowRate' => $aAllowRate,
                'allowComment' => $aAllowComment,
                'add_button' => array(
                    'type' => 'submit',
                    'name' => 'add_button',
                    'value' => $sNewAdC,
                ),
            ),
        );

 

Next, you need to add the fields to the database, so in phpMyAdmin, you can run this query:

ALTER TABLE `bx_ads_main`  ADD `Name` VARCHAR(45) NOT NULL,  ADD `Email` VARCHAR(255) NOT NULL,  ADD `Phone` VARCHAR(12) NOT NULL;

After you have done this, now create a php block on the Ads View page that displays the content the way you want it to be displayed.

Also - you will need to add language keys for the fields.

caredesign.net
Quote · 23 Jan 2014

well i do all that what you say and i see that there post ads, but then still not see that there sell place here 2 pichtures

seller2.jpg · 292.5K · 138 views
seller.jpg · 457.2K · 138 views
Quote · 23 Jan 2014

you can do something like the following to show the info in that php block. It is not tested so you may need to make some changes to fit your needs:

 

$sContact = mysql_query("SELECT * FROM `bx_ads_main` WHERE `ID` = '$this->iAdId'");
while($row = mysql_fetch_array($sContact))
  {
  $Name = $row['Name'];
  $Email = $row['Email'];
  $Phone = $row['Phone'];
  }
 
  echo '
  <div class="disignBoxFirst bx-def-margin-top bx-def-border">

    <div class="boxContent">';
   
         echo $Name . '<br>';
        echo $Email . '<br>';
        echo $Phone . '<br>';
   
    echo '</div>
   
</div>
';

caredesign.net
Quote · 23 Jan 2014

 

you can do something like the following to show the info in that php block. It is not tested so you may need to make some changes to fit your needs:

 

$sContact = mysql_query("SELECT * FROM `bx_ads_main` WHERE `ID` = '$this->iAdId'");
while($row = mysql_fetch_array($sContact))
  {
  $Name = $row['Name'];
  $Email = $row['Email'];
  $Phone = $row['Phone'];
  }
 
  echo '
  <div class="disignBoxFirst bx-def-margin-top bx-def-border">

    <div class="boxContent">';
   
         echo $Name . '<br>';
        echo $Email . '<br>';
        echo $Phone . '<br>';
   
    echo '</div>
   
</div>
';

 where i put this? Builders/Page Builder/Ads view? or where?

Quote · 23 Jan 2014

in the php block you created

caredesign.net
Quote · 23 Jan 2014

You would add a PHP Block to the ADS view page.  Do you have the tools to add a PHP Block?  You can do it using Deano's Tools if you have it installed.  Then you would add the code that Professor gave you to the PHP Block.

Geeks, making the world a better place
Quote · 23 Jan 2014

 

You would add a PHP Block to the ADS view page.  Do you have the tools to add a PHP Block?  You can do it using Deano's Tools if you have it installed.  Then you would add the code that Professor gave you to the PHP Block.

 I just check and i dont have that php blok there at all

Quote · 24 Jan 2014

 

You would add a PHP Block to the ADS view page.  Do you have the tools to add a PHP Block?  You can do it using Deano's Tools if you have it installed.  Then you would add the code that Professor gave you to the PHP Block.

 I try too that daeno's tools but sill there read only that seller contact

Quote · 24 Jan 2014

You will use Deano's Tools to add a PHP Block to the Ads View page.  In Deano's Tools, you will add the code at the time you create the block.  Then you go to page builders, go to the Ads view, and the block is in the inactive section.  You need to drag it up to the page where you want it to be displayed.

Geeks, making the world a better place
Quote · 24 Jan 2014

 

You will use Deano's Tools to add a PHP Block to the Ads View page.  In Deano's Tools, you will add the code at the time you create the block.  Then you go to page builders, go to the Ads view, and the block is in the inactive section.  You need to drag it up to the page where you want it to be displayed.

 I say i use that but still not work that place is stull same there read only SELLER CONTACT

look pictures

seller56.jpg · 326K · 136 views
Quote · 24 Jan 2014

this is all pictures this case what i do

seller contact.jpg · 347.2K · 151 views
seller contact2.jpg · 516.7K · 139 views
seller56.jpg · 326K · 134 views
seller contact.jpg · 347.2K · 148 views
seller2.jpg · 292.5K · 128 views
nimetön.jpg · 516.5K · 117 views
seller2.jpg · 292.5K · 124 views
Quote · 24 Jan 2014

If you want to PM me access to your site, and access to the database, I could take a look at this and see if I can get it working for you.

Geeks, making the world a better place
Quote · 24 Jan 2014

did you clear your cache

caredesign.net
Quote · 24 Jan 2014

 

you used an html block - instead of a php block

 I just try that daeno's tools

Quote · 24 Jan 2014

 

did you clear your cache

 Yes

Quote · 24 Jan 2014

oh shoot - if it is empty, then nothing will be displayed - Did you fill in the fields? - Also, I didn't think to add the Captions (smacks self)

caredesign.net
Quote · 24 Jan 2014

try this:

 

$sContact = mysql_query("SELECT * FROM `bx_ads_main` WHERE `ID` = '$this->iAdId'");
while($row = mysql_fetch_array($sContact))
  {
  $Name = $row['Name'];
  $Email = $row['Email'];
  $Phone = $row['Phone'];
  }
 
  echo '
  <div class="disignBoxFirst bx-def-margin-top bx-def-border">

    <div class="boxContent">';
   
        echo 'Name: ' . $Name . '<br>';
        echo 'Email: ' . $Email . '<br>';
        echo 'Phone: ' . $Phone . '<br>';
   
    echo '</div>
   
</div>
';

caredesign.net
Quote · 24 Jan 2014

Thanks Professor, I am taking a look now.

The items are added to the database, so will take a look at the PHP Block now.

OK, you had the wrong block in place; the PHP Block was inactive.  I removed the HTML block and put the PHP Block in place.  I also made the changes that Professor outlined.  The data needs some changes; maybe a table to hold the data.

I put the data in a table and applied an inline style to the table to give some padding to it.  You can remove that and apply a class or what have you.  I will leave styling it up to you.

Geeks, making the world a better place
Quote · 24 Jan 2014

 

Thanks Professor, I am taking a look now.

The items are added to the database, so will take a look at the PHP Block now.

OK, you had the wrong block in place; the PHP Block was inactive.  I removed the HTML block and put the PHP Block in place.  I also made the changes that Professor outlined.  The data needs some changes; maybe a table to hold the data.

I put the data in a table and applied an inline style to the table to give some padding to it.  You can remove that and apply a class or what have you.  I will leave styling it up to you.

 Ok, Thank you your help i appreciate that much, you too ProferrorSr thank you your help.

Quote · 25 Jan 2014

_bx_ads_caption_name

_bx_ads_caption_email

_bx_ads_caption_phone

that is post Ad and that is right but i dont find that admin panel/language settings/keys so i can translate that

is that right or not?

Quote · 25 Jan 2014

 

_bx_ads_caption_name

_bx_ads_caption_email

_bx_ads_caption_phone

that is post Ad and that is right but i dont find that admin panel/language settings/keys so i can translate that

is that right or not?

You will use the language section in the backend/admin.  Go to the add key.  Add each of the keys and the text for each language.

Geeks, making the world a better place
Quote · 25 Jan 2014

Icheck this pictures there is that

Name:

Email:

Phone

But when i change that my finnish language that place not change is still english language check pictures.

nimetön.jpg · 316.4K · 158 views
Quote · 25 Jan 2014

I just added a key to a site with English and French.  When to languages, added the key and in the English block I put in the English text and in the French block I put in the French text. If your site is not like that, then you may have to add to the language files; maybe someone else will tell you. 

Geeks, making the world a better place
Quote · 25 Jan 2014

 

I just added a key to a site with English and French.  When to languages, added the key and in the English block I put in the English text and in the French block I put in the French text. If your site is not like that, then you may have to add to the language files; maybe someone else will tell you. 

my site use Finnish and English language

I just added a key to a site with English and French <--- what key name you do that?

Quote · 25 Jan 2014

Check this picture is that right i mean that apostrophe

235.png · 349.4K · 127 views
Quote · 27 Jan 2014

 

Check this picture is that right i mean that apostrophe

 Yes. It coding that is a single quote. It has a purpose. So yes, thats correct.

https://www.deanbassett.com
Quote · 27 Jan 2014

DarkWarder.  You don't need to touch the PHP Block, I set that up for you.

Geeks, making the world a better place
Quote · 27 Jan 2014

The problem is that I did not set the display with a language key. Thats why it only showed in english - I typed the Caption in english. So, try replacing:

 

        echo 'Name: ' . $Name . '<br>';
        echo 'Email: ' . $Email . '<br>';
        echo 'Phone: ' . $Phone . '<br>';

 

with the following:

 

$sName = _t('_Seller name');
$sEmail = _t('_Seller Email');
$sPhone = _t('_Seller phone');

echo $sName . ': ' . $Name . '<br>';
echo $sEmail . ': ' . $Email . '<br>';
echo $sPhone . ': ' . $Phone . '<br>';

caredesign.net
Quote · 27 Jan 2014

scratch that - I forgot the GG changed your block. Will change it for you

caredesign.net
Quote · 27 Jan 2014

Issue resolved - you now have Finnish language keys for that block

_Seller name

_Seller phone

_Seller Email

caredesign.net
Quote · 27 Jan 2014

OK, I think I got confused on this one My apologies to DarkWarder, I was trying to help but not helping much.

Geeks, making the world a better place
Quote · 28 Jan 2014

@GG - you helped a great deal - don't shortchange yourself like that.

caredesign.net
Quote · 28 Jan 2014

@GG - you helped a great deal - don't shortchange yourself like that.

caredesign.net
Quote · 28 Jan 2014

 

OK, I think I got confused on this one My apologies to DarkWarder, I was trying to help but not helping much.

 You help me a lot so Thank You very much and i appreciate your help, and sorry i am not know script code so thatts why asking help

Quote · 28 Jan 2014

 

@GG - you helped a great deal - don't shortchange yourself like that.

i appreciate your help too thanks very much.

Quote · 28 Jan 2014

is someone see or know Modzzz because he not answer to my question long time so i think is he happen something sig or something else. Because i order he module but now i canot get contact him. If someone know something so please let me know that thank you.

Quote · 28 Jan 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.