[CDB] Advanced Profile Fields Pack

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Get Involved
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [3.1][3.2][BETA] Advanced Profile Fields Pack

Post by javiexin » Sat Feb 04, 2017 3:38 pm

I am glad to announce a new version of this extension.

This should be very close to something that may be submitted for validation. Please, take a look at the first post for what has been changed and compatibility.

Highlights of new version: requires 3.1.11 or 3.2.0. For 3.1.10 compatibility you need to insert a template event that has already been approved but not published in 3.1.

Please, see first posts of this topic for details!

As always, any issue you may find let me know here. And any feature suggestion as well...
Regards
-javiexin

User avatar
supanet
Registered User
Posts: 234
Joined: Sat Dec 15, 2012 4:20 pm
Location: UK
Contact:

Re: [3.1][3.2][BETA] Advanced Profile Fields Pack

Post by supanet » Sun Feb 05, 2017 5:54 am

Awesome will start testing. :D

piotr-linski
Registered User
Posts: 43
Joined: Tue Apr 26, 2016 10:22 am

Re: [3.1][3.2][BETA] Advanced Profile Fields Pack

Post by piotr-linski » Sun Feb 05, 2017 8:33 pm

hi Javiexin,

First of all great news the next version of APFP is available !!!
As soon as the time-out issue with installing PHPBB 3.2.0 is solved,
I will upgrade to PHPBB 3.2.0 and start using your latest version of APFP.

Today I had some time left to do some MYSQL queries with various advanced profile fields.

I noted that all the fields with multiple values are like: 1;5;8;12;19
When I do specific queries, I Allways seem to miss the last number because in this case 19 is not followed by a ";"

Is it a minor effort to arrange that consequently the last number in a multiple value string also ends with a ";".
And if so, could I make those changes myself? And what would I need to do?

Regards, Piotr

User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [3.1][3.2][BETA] Advanced Profile Fields Pack

Post by javiexin » Sun Feb 05, 2017 9:23 pm

piotr-linski wrote:
Sun Feb 05, 2017 8:33 pm
I noted that all the fields with multiple values are like: 1;5;8;12;19
Yes this is the way they are stored.
piotr-linski wrote:
Sun Feb 05, 2017 8:33 pm
When I do specific queries, I Allways seem to miss the last number because in this case 19 is not followed by a ";"
Then you are doing something wrong...
piotr-linski wrote:
Sun Feb 05, 2017 8:33 pm
Is it a minor effort to arrange that consequently the last number in a multiple value string also ends with a ";".
And if so, could I make those changes myself? And what would I need to do?
Sorry, but no. This is meant to be this way, to use explode/implode to get individual values. If I were to put the extra ";" that would give an extra element in the array, that I would have to take into consideration.

If you take the value as is and do an $array = explode(';', $value); you have exactly an array with all the selected elements. Traverse it with foreach($array as $opt) and you are done...

-javiexin

piotr-linski
Registered User
Posts: 43
Joined: Tue Apr 26, 2016 10:22 am

Re: [3.1][3.2][BETA] Advanced Profile Fields Pack

Post by piotr-linski » Sun Feb 05, 2017 9:45 pm

hi Javiexin,

-- thanks for your quick reply.

Regards, Piotr

Unweliath
Registered User
Posts: 42
Joined: Sat Jan 14, 2017 5:25 pm

Re: [3.1][3.2][BETA] Advanced Profile Fields Pack

Post by Unweliath » Mon Feb 06, 2017 9:24 pm

Dear Javiexin,

are you aware of any solution for forcing existing users to fill out mandatory profile fields? In my forum I added some fields I want all users to fill out. E.g. when they login the next time they are redirected to their profile with an information to update the respective fields.

User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [3.1][3.2][BETA] Advanced Profile Fields Pack

Post by javiexin » Mon Feb 06, 2017 9:58 pm

If I understand you right, what you want is that ALL users (old and new) are forced to fill profile fields that you just marked as mandatory (by redirecting to UCP on login, for example).

If that is the case, then no, sorry. This is not part of this extension, and I am not aware of any that would do what you request.

Regards,
-javiexin

Unweliath
Registered User
Posts: 42
Joined: Sat Jan 14, 2017 5:25 pm

Re: [3.1][3.2][BETA] Advanced Profile Fields Pack

Post by Unweliath » Tue Feb 07, 2017 6:31 am

Thanks for the quick answer!

Justsomeanimelover
Registered User
Posts: 11
Joined: Tue Feb 14, 2017 2:53 am

Re: [3.1][3.2][BETA] Advanced Profile Fields Pack

Post by Justsomeanimelover » Tue Feb 14, 2017 2:58 am

Limit profile fields to certain users - profile fields that only apply to certain users, selectable by user group or by permission? still to be confirmed
Is this already a thing? E.g. can specific profile fields be made available only to certain user groups?

Thank you.

User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [3.1][3.2][BETA] Advanced Profile Fields Pack

Post by javiexin » Tue Feb 14, 2017 10:28 am

Justsomeanimelover wrote:
Tue Feb 14, 2017 2:58 am
Limit profile fields to certain users - profile fields that only apply to certain users, selectable by user group or by permission? still to be confirmed
Is this already a thing? E.g. can specific profile fields be made available only to certain user groups?

Thank you.
Not yet, in the pipeline, but not too soon.
-javiexin

User avatar
Neculai Anisor
Registered User
Posts: 172
Joined: Tue Jan 08, 2013 9:36 pm
Location: Renfrew, Renfrewshire, Scotland
Name: Neculai Anișor
Contact:

Re: [3.1][3.2][BETA] Advanced Profile Fields Pack

Post by Neculai Anisor » Fri Feb 24, 2017 1:17 am

Can you set up which groups can use the fields? 😀
Image | Romanian Support Team | Animo @ phpBB.ro - Administrator

User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [3.1][3.2][BETA] Advanced Profile Fields Pack

Post by javiexin » Fri Feb 24, 2017 1:25 am

Neculai Anisor wrote:
Fri Feb 24, 2017 1:17 am
Can you set up which groups can use the fields? 😀
Read above.
javiexin wrote:
Tue Feb 14, 2017 10:28 am
Justsomeanimelover wrote:
Tue Feb 14, 2017 2:58 am
Limit profile fields to certain users - profile fields that only apply to certain users, selectable by user group or by permission? still to be confirmed
Is this already a thing? E.g. can specific profile fields be made available only to certain user groups?

Thank you.
Not yet, in the pipeline, but not too soon.
-javiexin

piotr-linski
Registered User
Posts: 43
Joined: Tue Apr 26, 2016 10:22 am

Re: [3.1][3.2][BETA] Advanced Profile Fields Pack

Post by piotr-linski » Mon Mar 06, 2017 10:32 am

hi Javiexin,

On Jan. 17th 2017, I asked you a question that evolved from the limited possibilities that the memberlist functionality of phpbb has to offer. Ofcourse phpbb is and remains an excellent piece of forum software!
So, looking for aditional memberlist functionality, I had to build a kind of "alternative" memberlist myself.

The topic of my initial question was to find a solution to display in a proper way the stored data of multi-selectable profile fields. As, for reasons of language-flexibility, those values are stored as semi-colon data like: 1, 3, 6, 9, 16, etc.

I followed your very good advise to:
1: explode the fields,
2: do the value change with a foreach if/elseif loop,
3: and implode the changed values back again, before,
4: displaying those values in a table.

I have been styling the final table with DataTables, using pagination and several search-functionalities.

A working version of this script (without the connection-data) is attached below.
However it is still in the testing-phase. So any additinal feedback is welcome and highly appreciated.

Regards, Piotr

Code: Select all

<html>
	<head>
    <title></title>		

<link rel="stylesheet" type="text/css" href="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/css/jquery.dataTables.css">

<script type="text/javascript" charset="utf8" src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script type="text/javascript" charset="utf8" src="https://code.jquery.com/ui/1.12.4/jquery-ui.js"></script>
<link rel="stylesheet" type="text/css" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">

<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>

<script src="https://cdn.jsdelivr.net/g/mark.js(jquery.mark.min.js)" charset="UTF-8"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.13/features/mark.js/datatables.mark.js" charset="UTF-8"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/datatables.mark.js/2.0.0/datatables.mark.min.css">

<script type="text/javascript" charset="utf8" src="https://cdnjs.cloudflare.com/ajax/libs/yadcf/0.9.1/jquery.dataTables.yadcf.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/yadcf/0.9.1/jquery.dataTables.yadcf.css">

</head>

<style type="text/css"> 

table {
    border: 0px solid #BC401E;
    padding-left: 2px;
    padding-right: 2px;
    width: auto;
    font-family: Verdana;
	 	font-weight:normal;
  	line-height: 1.6em;
}

	
table.dataTable thead th {
	border: 1px solid #92AD34;
	padding: 3px 18px 3px 10px;
	vertical-align:top;
	font-weight: bold;
	font-size: 80%;
	color: #5A5A5A;
	cursor: pointer;
	*cursor: hand;
}

td {
	vertical-align:top;
	border: 1px solid #92AD34;
	padding-left: 4px;
    padding-right: 4px;
    font-size: 75%;
    color: #5A5A5A; outline: none;
  	font-weight: normal;
  	line-height: 1.6em;
	} 
	
.dataTables_wrapper { 
	font-size: 75%; 
	font-weight:bold;
	}
	
.column-title {
	text-decoration:none; 
	color:#5A5A5A;
	}

.width1 {
	width: auto;
}

.width1 {
	width: 150%;
}

div {					
	font-family: Verdana;
	padding: 0px;
  	border: 0px solid #000000;		

}
mark {
    background: yellow;
    color: #9A0000;
}

table.dataTable th { background-color: #CDE089; }  
table.dataTable tr.odd { background-color: #EDFAC0; }
table.dataTable tr.even { background-color: #F9FEEB; }
table.dataTable tr.odd td.sorting_1 { background-color: #BABABA; }
table.dataTable tr.odd td.sorting_2 { background-color: #3E5F14; }
table.dataTable tr.odd td.sorting_3 { background-color: #BC401E; }
table.dataTable tr.even td.sorting_1 { background-color: #DADADA; }
table.dataTable tr.even td.sorting_2 { background-color: #BC401E; }
table.dataTable tr.even td.sorting_3 { background-color: #3E5F14; }


/*
 * Sorting
 */
.sorting { background: url('https://datatables.net/media/images/sort_both.png') no-repeat center right; }
.sorting_asc { background: url('https://datatables.net/media/images/sort_asc.png') no-repeat center right; }
.sorting_desc { background: url('https://datatables.net/media/images/sort_desc.png') no-repeat center right; }

.sorting_asc_disabled { background: url('https://datatables.net/media/images/sort_asc_disabled.png') no-repeat center right; }
.sorting_desc_disabled { background: url('https://datatables.net/media/images/sort_desc_disabled.png') no-repeat center right; }
 
table.dataTable thead th:active,
table.dataTable thead td:active {
	outline: none;
}


</style>


<?php
	$conn = mysqli_connect("localhost", "XXX", "YYY", "ZZZ");
	$orderBy = "pf_achternaam";
	$order = "asc";
	
	
	
//	$sql = "SELECT * FROM phpbb_profile_fields_data 
//	INNER JOIN phpbb_users 
//	WHERE phpbb_profile_fields_data.user_id = phpbb_users.user_id 
//	ORDER BY " . $orderBy . " " . $order;
//	$result = mysqli_query($conn,$sql);

	$sql = "SELECT d.pf_voornaam, d.pf_tussenvoegsel, d.pf_achternaam, d.pf_woonplaats, d.pf_telefoon_vast, d.pf_telefoon_mobiel, d.pf_website, d.pf_werkgebied, d.pf_spec_doelgroepen AS target, d.pf_specialisme, d.pf_ei_opl_afgerond AS ready, phpbb_users.user_email
	FROM phpbb_profile_fields_data d
	INNER JOIN phpbb_users ON d.user_id=phpbb_users.user_id
	ORDER BY " . $orderBy . " " . $order;
	$result = mysqli_query($conn,$sql);
?>


<body id="yadcf_example">
<div id="container">
<!--     
<div id="external_filter_container_wrapper">
        <label>External filter for "More Data" column :</label>
        <div id="external_filter_container"></div>
      </div>
-->
<form name="frmSearch" method="post" action="">
	 
<?php if(!empty($result))	 { ?>
<table class="table-condensed table-striped table-bordered" id="example" width="2600px">
          <thead>
        <tr>
          <!-- <th width="10%"><span class="column-title">Gebruikersnaam</span></th> -->
          <th><span class="column-title">Voornaam</span></th>
          <th width="17%"><span class="column-title">Achternaam</a></span></th>
          <th width="15%"><span class="column-title">Woonplaats</a></span></th>
          <th><div style="width: 115px;"><span class="column-title">Tel. vast</span></div></th>
          <th><div style="width: 115px;"><span class="column-title">Tel. mobiel</span></div></th>
          <th width="20%"><span class="column-title">E-mail</span></th>
          <th width="15%"><span class="column-title">Website</span></th>
          <th width="20%"><span class="column-title">Werkgebied</span></th>
     	  <th><div style="width: 200px;"><span class="column-title">Doelgroepen</span></div></th>
          <th><div style="width: 200px;"><span class="column-title">Specialisme</span></div></th>     
          <th><div style="width: 100px;"><span class="column-title">Opl. afgerond</span></div></th>                  
        </tr>
      </thead>
    <tbody>
	<?php
		while($row = mysqli_fetch_array($result)) 
		{
			
foreach ($row as $key=>&$val) 
{
	if ($key=="ready" && $val==1) {$val="n.v.t.";}
	elseif ($key=="ready" && $val==2) {$val="voor 2000";}
	elseif ($key=="ready" && $val==3) {$val="2000";}
	elseif ($key=="ready" && $val==4) {$val="2001";}
	elseif ($key=="ready" && $val==5) {$val="2002";}
	elseif ($key=="ready" && $val==6) {$val="2003";}
	elseif ($key=="ready" && $val==7) {$val="2004";}
	elseif ($key=="ready" && $val==8) {$val="2005";}
	elseif ($key=="ready" && $val==9) {$val="2006";}
	elseif ($key=="ready" && $val==10) {$val="2007";}
	elseif ($key=="ready" && $val==11) {$val="2008";}
	elseif ($key=="ready" && $val==12) {$val="2009";}
    elseif ($key=="ready" && $val==13) {$val="2010";}
	elseif ($key=="ready" && $val==14) {$val="2011";}
	elseif ($key=="ready" && $val==15) {$val="2012";}
	elseif ($key=="ready" && $val==16) {$val="2013";}
    elseif ($key=="ready" && $val==17) {$val="2014";}
	elseif ($key=="ready" && $val==18) {$val="2015";}
	elseif ($key=="ready" && $val==19) {$val="2016";}
	elseif ($key=="ready" && $val==20) {$val="2017";}
    elseif ($key=="ready" && $val==21) {$val="2018";}
	elseif ($key=="ready" && $val==22) {$val="2019";}
}

foreach ($row as $key=>&$val) 
{ if ($key=="pf_website" && $val=="http://www.mijnwebsite.nl") {$val="";} }			
	
			
			
$selected_opts=explode(';',$row['pf_werkgebied']);
foreach ($selected_opts as & $selected_opt) 
{
	if ($selected_opt == '1'){ $selected_opt = "Nederland"; }
	elseif ($selected_opt == '2'){ $selected_opt = "Groningen"; }
	elseif ($selected_opt == '3'){ $selected_opt = "Friesland"; }
	elseif ($selected_opt == '4'){ $selected_opt = "Drenthe"; }
	elseif ($selected_opt == '5'){ $selected_opt = "Overijssel"; }
	elseif ($selected_opt == '6'){ $selected_opt = "Gelderland"; }
	elseif ($selected_opt == '7'){ $selected_opt = "Flevoland"; }
	elseif ($selected_opt == '8'){ $selected_opt = "Noord-Holland"; }
	elseif ($selected_opt == '9'){ $selected_opt = "Zuid-Holland"; }
	elseif ($selected_opt == '10'){ $selected_opt = "Zeeland"; }
	elseif ($selected_opt == '11'){ $selected_opt = "Noord-Brabant"; }
	elseif ($selected_opt == '12'){ $selected_opt = "Limburg"; }
	elseif ($selected_opt == '13'){ $selected_opt = "Amsterdam"; }
	elseif ($selected_opt == '14'){ $selected_opt = "Rotterdam"; }
	elseif ($selected_opt == '15'){ $selected_opt = "Den Haag"; }
	elseif ($selected_opt == '16'){ $selected_opt = "Utrecht"; }
	elseif ($selected_opt == '17'){ $selected_opt = "België"; }
	elseif ($selected_opt == '18'){ $selected_opt = "Duitsland"; }
	elseif ($selected_opt == '19'){ $selected_opt = "Overige"; }
// echo "$selected_opt <br />";
}
$row['pf_werkgebied'] = implode(', ', $selected_opts);
// echo "$selected_opts_string <br />";

$selected_opts=explode(';',$row['target']);
foreach ($selected_opts as & $selected_opt) 
{
	if ($selected_opt == '1'){ $selected_opt = "Kinderen"; }
	elseif ($selected_opt == '2'){ $selected_opt = "Jongeren"; }
	elseif ($selected_opt == '3'){ $selected_opt = "Studerenden"; }
	elseif ($selected_opt == '4'){ $selected_opt = "Twintigers"; }
	elseif ($selected_opt == '5'){ $selected_opt = "Dertigers"; }
	elseif ($selected_opt == '6'){ $selected_opt = "Veertigers"; }
	elseif ($selected_opt == '7'){ $selected_opt = "Vijftigers"; }
	elseif ($selected_opt == '8'){ $selected_opt = "Zestigers"; }
	elseif ($selected_opt == '9'){ $selected_opt = "Zeventigers"; }
	elseif ($selected_opt == '10'){ $selected_opt = "Tachtig+"; }
	elseif ($selected_opt == '11'){ $selected_opt = "Mannen"; }
	elseif ($selected_opt == '12'){ $selected_opt = "Vrouwen"; }
	elseif ($selected_opt == '13'){ $selected_opt = "Analfabeten"; }
	elseif ($selected_opt == '14'){ $selected_opt = "Burn-outers"; }
	elseif ($selected_opt == '15'){ $selected_opt = "Hoogopgeleiden"; }
	elseif ($selected_opt == '16'){ $selected_opt = "Kansarmen"; }
	elseif ($selected_opt == '17'){ $selected_opt = "Mantelzorgers"; }
	elseif ($selected_opt == '18'){ $selected_opt = "Rouwenden"; }
	elseif ($selected_opt == '19'){ $selected_opt = "Vluchtelingen"; }
	elseif ($selected_opt == '20'){ $selected_opt = "Vrijwilligers"; }
	elseif ($selected_opt == '21'){ $selected_opt = "Werkelozen"; }
	elseif ($selected_opt == '22'){ $selected_opt = "Zieken"; }
	elseif ($selected_opt == '23'){ $selected_opt = "Coaches"; }
	elseif ($selected_opt == '24'){ $selected_opt = "Gezinnen"; }
	elseif ($selected_opt == '25'){ $selected_opt = "Organisaties (profit)"; }
	elseif ($selected_opt == '26'){ $selected_opt = "Organisaties (non-profit)"; }
	elseif ($selected_opt == '27'){ $selected_opt = "Managers"; }
	elseif ($selected_opt == '28'){ $selected_opt = "Ondernemers"; }
	elseif ($selected_opt == '29'){ $selected_opt = "Startende ondernemers"; }
// echo "$selected_opt <br />";
}
$row['target'] = implode(', ', $selected_opts);
// echo "$selected_opts_string <br />";
			
$selected_opts=explode(';',$row['pf_specialisme']);
foreach ($selected_opts as & $selected_opt) 
{
	if ($selected_opt == '1'){ $selected_opt = "Business Coaching"; }
	elseif ($selected_opt == '2'){ $selected_opt = "Counseling"; }
	elseif ($selected_opt == '3'){ $selected_opt = "Executive Coaching"; }
	elseif ($selected_opt == '4'){ $selected_opt = "Holistische coaching"; }
	elseif ($selected_opt == '5'){ $selected_opt = "Intuïtieve coaching"; }
	elseif ($selected_opt == '6'){ $selected_opt = "Lichaamsgericht coachen"; }
	elseif ($selected_opt == '7'){ $selected_opt = "Lifecoaching"; }
	elseif ($selected_opt == '8'){ $selected_opt = "Oplossingsgericht coachen"; }
	elseif ($selected_opt == '9'){ $selected_opt = "Performance coaching"; }
	elseif ($selected_opt == '10'){ $selected_opt = "Provocatief coaching"; }
	elseif ($selected_opt == '11'){ $selected_opt = "Rouwverwerking"; }
	elseif ($selected_opt == '12'){ $selected_opt = "Sales coaching"; }
	elseif ($selected_opt == '13'){ $selected_opt = "Senioren coaching"; }
	elseif ($selected_opt == '14'){ $selected_opt = "Systemisch coachen"; }
	elseif ($selected_opt == '15'){ $selected_opt = "Teamcoaching"; }
	elseif ($selected_opt == '16'){ $selected_opt = "Wandelcoaching"; }
	elseif ($selected_opt == '17'){ $selected_opt = "Work coaching"; }
	elseif ($selected_opt == '18'){ $selected_opt = "Zingeving"; }
	elseif ($selected_opt == '19'){ $selected_opt = "Overige"; }

// echo "$selected_opt <br />";
}
$row['pf_specialisme'] = implode(', ', $selected_opts);
// echo "$selected_opts_string <br />";			
			
			
			
				?>
        <tr>
            <!-- <td><?php echo $row["username"]; ?></td> -->
			<td><?php echo $row["pf_voornaam"]; ?></td>
			<td><?php echo $row["pf_tussenvoegsel"]; ?>&nbsp;<?php echo $row["pf_achternaam"]; ?></td>
			<td><?php echo $row["pf_woonplaats"]; ?></td>
			<td><?php echo $row["pf_telefoon_vast"]; ?></td>
			<td><?php echo $row["pf_telefoon_mobiel"]; ?></td>
			<td><a href="mailto:<?php echo $row["user_email"]; ?>"><?php echo $row["user_email"]; ?></a></td>
<!--		<td><?php echo $row["pf_website"]; ?></td> -->
			<td><a href="http://<?php echo substr($row["pf_website"], 7); ?>"target="_blank"><?php echo substr($row["pf_website"], 7); ?></a></td>
			<td><?php echo $row["pf_werkgebied"]; ?></td>
			<td><?php echo $row["target"]; ?></td>
			<td><?php echo $row["pf_specialisme"]; ?></td>
			<td><?php echo $row["ready"]; ?></td>
		</tr>
   <?php
		}
   ?>
   </tbody>
  </table>


<script type="text/javascript">
  $(document).ready(function() {
   		$("#example").dataTable({   
	   		"mark": true,
	   		"scrollX": false,
         	bJQueryUI: true,
	        bStateSave: true,
          	sPaginationType: "full_numbers",
         	"bSort": true,
           	"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "Alle"]],
           	"language": {
	        	"sSearch": "Zoekterm:&nbsp;&nbsp;&nbsp;",
				"lengthMenu": "Laat _MENU_ records per pagina zien",
				"zeroRecords": "Niets gevonden - sorry",
				"info": "Je ziet nu pagina _PAGE_ van _PAGES_",
				"infoEmpty": "Geen records gevonden",
				"infoFiltered": "(betreft een selectie uit _MAX_ records)",
            	"oPaginate": {
 					"sFirst": "Eerste",
 					"sLast": "Laatste",
 					"sNext": "Volgende",
 					"sPrevious": "Vorige"
 				}
        }
        
} ) ;
} ) ;
        
$(document).ready(function(){
  $('#example').dataTable().yadcf([
    {column_number : 1, filter_default_label: "maak je keuze"},
    {column_number : 2, filter_default_label: "maak je keuze"},
	{column_number : 7, filter_default_label: "maak je keuze"},
	{column_number : 10, filter_type: "range_number_slider"}]);

} ) ;

</script>
  
<?php } ?>
  </form>
  </div>
</body>
</html>

User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [3.1][3.2][BETA] Advanced Profile Fields Pack

Post by javiexin » Mon Mar 06, 2017 10:48 am

Hi piotr,

Without seeing it working, I cannot do much, but from a first glance, I see that you are hardcoding a lot of "text" in your code, that should really be in language files. And in particular, the text that refers to Profile Field options should already be available in the database, so there would be no need for such long and ugly lists of if/elseif/... You would have to do a query to the DB on the profile_fields_lang table, to get the right language value for the int value in the profile_fields_data table. And you are mixing PHP and HTML and CSS and JavaScript all in the same file :(.

Sorry I cannot be of much further help,
-javiexin

piotr-linski
Registered User
Posts: 43
Joined: Tue Apr 26, 2016 10:22 am

Re: [3.1][3.2][BETA] Advanced Profile Fields Pack

Post by piotr-linski » Mon Mar 06, 2017 11:10 am

Hi Javiexin,

thanks for your reply.
Just wanted to let you and the community know how I implemented your suggestions sofar.
In a next version
-- I will follow your advise to put HTML, CSS and javascript in separate files.
-- to find a nicer solution that uses the language values of PHPBB.

Will keep you posted!
Regards, Piotr

Locked

Return to “Extensions in Development”