I know how to add a page column in to profiles page in the navigation page builder.
Is there a way I can add in a second page row???
This would be copying the php code and using it twice on eg: the profile page (me thinks)
|
profile page:
.
.
________Header
_____________________ROW1
Column1 | Column2
Coluffffmn1 | Column2
Coluffffmn1 | Column2
Cofffflumn1 | Column2
Colffffumn1 | Column2
Colffffumn1 | Column2
_____________________ROW2
_______Column1
_____________________
________Footer
|
|
You can test this
Edit templates/tmpl_uni/page_7.html
From:
__include _header.html__
<div id="divUnderCustomization">
__page_main_code__
<div class="clear_both"></div>
</div>
__include _footer.html__
To:
__include _header.html__
<div id="divUnderCustomization"> __page_main_code__
<div class="clear_both"></div>
<div class="disignBoxFirst"> <div class="boxFirstHeader">Female Members</div> <div class="boxContent"> <div class="clear_both"></div> __female__ <div class="clear_both"></div> </div> </div>
<div class="clear_both"></div>
</div>
__include _footer.html__
Edit profile.php
Add this code $_page_cont[$_ni]['female'] = getFemaleUser();
after this line $_page_cont[$_ni]['page_main_code'] = $oPPV -> getCode();
Edit profiles.inc.php
add code below after this line $aUser = array(); //global cache array
/** * Female members on profile page above footer */ function getFemaleUser() { global $site; global $aPreValues; global $getBlockCode_Female_db_num; global $max_thumb_width; global $max_thumb_height; global $oTemplConfig;
$female_num = '7';
if ( $female_num ) { $female_res = db_res( "SELECT `ID`, `NickName`, `DateOfBirth`, `Country` FROM `Profiles` WHERE `Sex` = 'female' AND `Couple` = '0' AND `Picture` = '1' AND `Status` = 'Active' ORDER BY RAND() LIMIT $female_num" ); $ret .= '<div class="clear_both"></div>';
if( mysql_num_rows( $female_res ) > 0 ) { $j=1; while( $female_arr = mysql_fetch_assoc( $female_res ) ) {
$female_country = _t($aPreValues['Country'][$female_arr['Country']]['LKey']); $female_flag = ' <img src="'. ($site['flags'].strtolower($female_arr['Country'])) .'.gif" alt="flag" />';
$ret .= '<div class="featured_block_1">'; $ret .= get_member_thumbnail( $female_arr['ID'], 'none' ); $ret .= '<center>'; $ret .= '<a href="' . getProfileLink( $female_arr['ID'] ) . '">'; $ret .= process_line_output( $female_arr['NickName'] ); $ret .= '</a>'; $ret .= ", "; $ret .= age( $female_arr['DateOfBirth'] ); $ret .= '<br />'; $ret .= $female_country; $ret .= $female_flag; $ret .= '</center>'; $ret .= '<br />'; $ret .= '</div>';
$j++; } } else { $ret .= '<div class="no_result">'; $ret .= '<div>'; $ret .= _t("_No results found"); $ret .= '</div>'; $ret .= '</div>'; } $ret .= '<div class="clear_both"></div>'; }
return $ret; }
|
okweb,
You are a tireless helper here at the forums.
Thank you.
|
lol this code you posted looks like it is for showing only female members on your profile page!?!?!?!?! lololololo
whhhhhyyyyy did you put that??? lololol sorry i just think its funny is all its like the casanovas perfect fix lolololol lolololol!!!!!
ahhhh lol sorry i am being a git
|
How about this for templates/tmpl_uni/page_7.html ????
__include _header.html__
<div id="divUnderCustomization">
__page_main_code__
<div class="clear_both">
<div> <h3>This is a header</h3> <p>This is a paragraph.</p> </div>
</div>
</div>
__include _footer.html__
|
How about this for templates/tmpl_uni/page_7.html ????
__include _header.html__
<div id="divUnderCustomization">
__page_main_code__
<div class="clear_both">
<div> <h3>This is a header</h3> <p>This is a paragraph.</p> </div>
</div>
</div>
__include _footer.html__
It's up to you how you want it, everything depends on what you shall have here.
If you only use page_7.html, you can only add html code.
----------------------
If you shall use php code you must do it like I did in my example.
You have the steps,
imagination to change code to what you will have is completely up to you...
|
newbreed |
Well i am grateful to you for the clarification because it has worked thank you! |
Hi okweb - you seem to be extremely helpful ;)
Any chance you could tell me how to add a row to the homepage?
If you could specify the actual file names I have to change (the ones that have the PHP or CSS that I have to modify) it would be a HUGE help. All I know is that it involves the clear_both call in CSS.
I want to do the same thing Bamben did - but just on the homepage...
Thanks so much in advance!
If anyone else can help - I am grateful to whomever may provide an answer ;)
(My site is: FanBackers.com)
Jason
|
Posting again - can anybody help me?
Reposting:
Any chance you could tell me how to add a row to the homepage?
If you could specify the actual file names I have to change (the ones that have the PHP or CSS that I have to modify) it would be a HUGE help. All I know is that it involves the clear_both call in CSS.
I want to do the same thing Bamben did - but just on the homepage...
Thanks so much in advance!
If anyone else can help - I am grateful to whomever may provide an answer ;)
(My site is: FanBackers.com)
Thanks!! Jay
|
Same thing. Instead of page_7.html it's page_1.html
https://www.deanbassett.com |
Same thing. Instead of page_7.html it's page_1.html
Does this apply to 7.0.3
|
Same thing. Instead of page_7.html it's page_1.html
Does this apply to 7.0.3
It might. You never know until you try.
BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
Hey guys - thanks so much for multiple gestures of help! ;) I am grateful - I hope you don't mind helping me clarify here - but the code above from okweb has a lot of 'female' calls in it. As I read further I saw that Bamben posted a different batch of code and okweb says you can do it in the php or html.
So, to clarify, I understand I must modify page_1.html. I have found it in a folder called 'base' inside my templates folder.
When I open it - I see this:
<bx_include_auto:_sub_header.html /> __promo_code__ __page_main_code__ <bx_include_auto:_sub_footer.html />
Can some please literally post the right code for me to copy and paste over this in order to add the bottom row? I know it has something to do with the 'clear_both' command (or at least I think) - I am not a CSS pro, just familiar with it and html for many years.
I would be super-grateful if someone could:
1. Confirm that I have the right html page
2. Paste the right code here so I can copy it and paste over my html code for page_1.html
Thanks again guys - I am really appreciative of your time and attention.
Jay
|
i'd like to use this solution, but if i use it, will it only display female members on my profile page? i just want to be able to have 2 rows, so i can add add a block that can go across the bottom then 3 at the top |
HI buzzpaul - I agree, that's what I want to do as well!
Hopefully someone will copy and paste here for us to get the right code/clarification.
We would appreciate the help if anyone can give us some assistance here ;)
Jay
|
Anyone? Some help please? ;) |
This change will add a row at the top of the homepage, you can change code inside the function to what you will have here.
1) open file templates/base/page_1.html
add this code: __my_promo_code__
all code on the file page_1.html
<bx_include_auto:_sub_header.html /> __promo_code__ __my_promo_code__ __page_main_code__ <bx_include_auto:_sub_footer.html />
2) index.php
add the code bellow after this code $_page_cont[$_ni]['promo_code'] = getPromoCode();
$_page_cont[$_ni]['my_promo_code'] = getMyPromoCode();
3)
inc/design.inc.php
add the code bellow after function getPromoCode()
(You can change how many members you will have inside the box here: $mypromo_num = '12';)
function getMyPromoCode() { global $site; global $aPreValues; global $getBlockCode_MyPromo_db_num; global $max_thumb_width; global $max_thumb_height; global $oTemplConfig;
$mypromo_num = '12';
if ( $mypromo_num ) { $mypromo_res = db_res( "SELECT `ID`, `NickName`, `DateOfBirth`, `Country` FROM `Profiles` WHERE `Couple` = '0' AND `Status` = 'Active' ORDER BY RAND() LIMIT $mypromo_num" ); $ret .= '<div class="clear_both"></div>';
$ret .= '<div class="disignBoxFirst">'; $ret .= '<div class="boxFirstHeader">My Promo Code</div>'; $ret .= '<div class="boxContent">';
if( mysql_num_rows( $mypromo_res ) > 0 ) { $j=1; while( $mypromo_arr = mysql_fetch_assoc( $mypromo_res ) ) {
$mypromo_country = _t($aPreValues['Country'][$mypromo_arr['Country']]['LKey']); $mypromo_flag = ' <img src="'. ($site['flags'].strtolower($mypromo_arr['Country'])) .'.gif" alt="flag" />';
$ret .= '<div class="featured_block_1">'; $ret .= get_member_thumbnail( $mypromo_arr['ID'], 'none' ); $ret .= '<center>'; $ret .= '<a href="' . getProfileLink( $mypromo_arr['ID'] ) . '">'; $ret .= process_line_output( $mypromo_arr['NickName'] ); $ret .= '</a>'; $ret .= ", "; $ret .= age( $mypromo_arr['DateOfBirth'] ); $ret .= '<br />'; $ret .= $mypromo_country; $ret .= $mypromo_flag; $ret .= '</center>'; $ret .= '</div>';
$j++;
} $ret .= '</div>'; $ret .= '</div>'; } else { $ret .= '<div class="no_result">'; $ret .= '<div>'; $ret .= _t("_No results found"); $ret .= '</div>'; $ret .= '</div>'; } $ret .= '<div class="clear_both"></div>';
}
return $ret; } |
Hi okweb - I am very, very grateful for your help!
Before I make all of these changes - you said it will add a row at the top of the homepage? Can I still achieve this result by implementing this code?
________Header
_____________________ROW1
Column1 | Column2
Coluffffmn1 | Column2
Coluffffmn1 | Column2
Cofffflumn1 | Column2
Colffffumn1 | Column2
Colffffumn1 | Column2
_____________________ROW2
_______Column1
_____________________
________Footer
|
Again - I am very grateful for your time and attention okweb. |
this is probably the easyest way to add a box above the footer, hope it will help you
Add a custom Block with help of a language Key: ------------------------------------------------------------------
1) Admin/Settings/Language
Click on add a new Language Key
Key name: _Custom Footer Block Category: System String text for English language: Add your own HTML code here, edit your code later with help of this language key.
SAVE IT -------
2) open file: inc/design.inc.php
find function getPromoCode()
add the code bellow above this function
function getCustomFooterCode() { global $site; global $oTemplConfig;
$show_customFootercode = '1'; //Edit to 0 and you will hide the Custom Footer box if ( $show_customFootercode == 1) { $ret = ''; $ret .= '<div class="clear_both"></div>'; $ret .= '<div class="disignBoxFirst">'; $ret .= '<div class="boxFirstHeader">Custom Footer Block</div>'; //Edit title here $ret .= '<div class="boxContent">'; $ret .= _t("_Custom Footer Block"); $ret .= '</div>'; $ret .= '</div>'; return $ret; } }
3) open file: templates/base/page_1.html
add this code: __custom_footer_code__
like I have done bellow
<bx_include_auto:_sub_header.html /> __promo_code__ __page_main_code__ __custom_footer_code__ <bx_include_auto:_sub_footer.html />
4) open file: index.php
Find this code: $_page_cont[$_ni]['promo_code'] = getPromoCode();
Add this code bellow: $_page_cont[$_ni]['custom_footer_code'] = getCustomFooterCode();
5) DONE :) |
and what if you only want it on the profile page? i assume this would make it on all pages? |
and what if you only want it on the profile page? i assume this would make it on all pages?
1) and 2) will be equal
3) open file: templates/base/page_5.html
add this code: __custom_footer_code__
like I have done bellow
<bx_include_auto:_sub_header.html /> <div id="custom_block"> __custom_block__ </div> <div id="divUnderCustomization"> __page_main_css__ __page_main_code__ <div class="clear_both"></div> </div> __custom_footer_code__ <bx_include_auto:_sub_footer.html />
4) open file: profile.php
Find this code: PageCode();
Add this code above: $_page_cont[$_ni]['custom_footer_code'] = getCustomFooterCode();
Like this: $_page_cont[$_ni]['custom_footer_code'] = getCustomFooterCode(); PageCode();
|
You can test this
Edit templates/tmpl_uni/page_7.html
From:
__include _header.html__
<div id="divUnderCustomization">
__page_main_code__
<div class="clear_both"></div>
</div>
__include _footer.html__
To:
__include _header.html__
<div id="divUnderCustomization"> __page_main_code__
<div class="clear_both"></div>
<div class="disignBoxFirst"> <div class="boxFirstHeader">Female Members</div> <div class="boxContent"> <div class="clear_both"></div> __female__ <div class="clear_both"></div> </div> </div>
<div class="clear_both"></div>
</div>
__include _footer.html__
Edit profile.php
Add this code $_page_cont[$_ni]['female'] = getFemaleUser();
after this line $_page_cont[$_ni]['page_main_code'] = $oPPV -> getCode();
Edit profiles.inc.php
add code below after this line $aUser = array(); //global cache array
/** * Female members on profile page above footer */ function getFemaleUser() { global $site; global $aPreValues; global $getBlockCode_Female_db_num; global $max_thumb_width; global $max_thumb_height; global $oTemplConfig;
$female_num = '7';
if ( $female_num ) { $female_res = db_res( "SELECT `ID`, `NickName`, `DateOfBirth`, `Country` FROM `Profiles` WHERE `Sex` = 'female' AND `Couple` = '0' AND `Picture` = '1' AND `Status` = 'Active' ORDER BY RAND() LIMIT $female_num" ); $ret .= '<div class="clear_both"></div>';
if( mysql_num_rows( $female_res ) > 0 ) { $j=1; while( $female_arr = mysql_fetch_assoc( $female_res ) ) {
$female_country = _t($aPreValues['Country'][$female_arr['Country']]['LKey']); $female_flag = ' <img src="'. ($site['flags'].strtolower($female_arr['Country'])) .'.gif" alt="flag" />';
$ret .= '<div class="featured_block_1">'; $ret .= get_member_thumbnail( $female_arr['ID'], 'none' ); $ret .= '<center>'; $ret .= '<a href="' . getProfileLink( $female_arr['ID'] ) . '">'; $ret .= process_line_output( $female_arr['NickName'] ); $ret .= '</a>'; $ret .= ", "; $ret .= age( $female_arr['DateOfBirth'] ); $ret .= '<br />'; $ret .= $female_country; $ret .= $female_flag; $ret .= '</center>'; $ret .= '<br />'; $ret .= '</div>';
$j++; } } else { $ret .= '<div class="no_result">'; $ret .= '<div>'; $ret .= _t("_No results found"); $ret .= '</div>'; $ret .= '</div>'; } $ret .= '<div class="clear_both"></div>'; }
return $ret; }
HI, thank you for your help so far. I would also like to do this but instead of showing only women, I would like somthing like ....'you may also like' and for some members of the opposite sex to show. Like, if its a male, to be shown women from his country. If it's a woman, to be shown men from the same country. Basicaly what ever the member chose at registration 'looking for' men or woman, to be shown that.
Please help me out as I think this would be a very good thing to do.
Thank you
|