Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Sun Zaza

Pages: [1] 2 3 4 5 ... 34
1
Hi,

In the file db_field_definitions.php I want to change this for example: $additional_image_fields['image_banner'] = array($lang['banner'], [u][b]"text"[/b][/u], 0); to $additional_image_fields['image_banner'] = array($lang['banner'], [u][b]"radio"[/b][/u], 0); (text to radio).
I want to use a form. Not updating the file with Dreamweaver.


I just want to know how I can reach the file field_definitions.php. The form and the rest of the code I can do it myself.

Thank you in advance,
Sun Zaza

2
Discussion & Troubleshooting / Confirm before a form submit
« on: October 31, 2020, 09:03:34 AM »
Hi,

How can I get a confirmation before a form submit (ACP)?

I believe I have te edit this function:

function show_form_header($phpscript$action ""$name "formular"$uploadform 0) {
  global 
$site_sess;

  if (
$uploadform) {
    
$upload " ENCTYPE=\"multipart/form-data\"";
  }
  else {
    
$upload "";
  }
  echo 
"<form action=\"".$site_sess->url(safe_htmlspecialchars(strip_tags($phpscript)))."\"".$upload." name=\"".$name."\" method=\"post\">\n";
  if (
$action != "") {
    echo 
"<input type=\"hidden\" name=\"action\" value=\"".$action."\">\n";
  }
}


Thank you in advance,
Sun Zaza

3
Hi,

I have a small problem:

I am using this peace of code in db_field_definitions.php to get some info from the database (TRUCS).

Code: [Select]
$sql = "SELECT truc_name, truc_niveau
FROM ".TRUCS_TABLE."
WHERE truc_actief = 1
ORDER BY truc_name ASC";
$result = mysql_query($sql);
$truc_name = array("---");
while ($truc_row = $site_db->fetch_array($result)) {
$truc_name[] = current($truc_row);

$additional_combo_fields['combo_truc2'] = array($lang['combo_truc2'], "dropdown", 0, $truc_name, 0, 0, 0, 0);
}

The results in de dropbox is somthing like:
aaa
bbb
ccc
ddd

Now I want something like:

aaa (10)
bbb (40)
ccc (30)
ddd (200)

The numbers are from (truc_niveau).

I tried everything, but no luck.

Thank you in advance.
Cruxy

5
Hi Andy, Thanks.

I hope you can give me a hint how to add a new User Level. I will do the rest.
Thank you in advace,

Cruxy

6
Hi,

When you want to edit users, you have to choose first in the dropbox the user level. I want that the dorpbox automatically select the Registered users instead of empty field. Something like SELECTED, but I could not find it.

Thank you in advance,
Cruxy

7
Hi,

How can I add a new user lever to my gallery. Now we have Administrators, Registered users, Registered users (Non active). I want to have also: Friends.

Thank you in advance for any help.

Cruxy

8
I solved it with format_text().

Thank you

9
It is done. I like it. Good work :wink:

10
Hello,

How can I us tableinfo in db_field_definitions.php?

Thank you in advance,
Cruxy

11
Thank Andy. It works perfect.

Have a nice day.

12
Hi,

I have many plugins in the ACP plugins and I need to sort them (A-Z).

I know that we need to use something like $files = array() and sort($files)
Can someone help me to do that?


if (@is_dir("plugins")) {
            
show_nav_header("PlugIns");
            
$handle = @opendir("plugins/");
            while (
$file = @readdir($handle)) {
              if (
get_file_extension($file) != "php") {
                continue;
              }
              
$plugin_file file("./plugins/".$file);
	
	
	
  
              
$plugin_file[0] = trim($plugin_file[0]);
              if (
preg_match("/PLUGIN_TITLE:(.+)/"$plugin_file[0], $regs)) {
                
show_nav_option(trim($regs[1]), "./plugins/".$file);
              }
              else {
                
show_nav_option($file"./plugins/".$file);
              }
            }
            @
closedir($handle);
          }



Thank you in advance,

13
Hi V@no,

It is unchanged. This is the function on includes/functions.php:
function format_text($text$html 0$word_wrap 0$bbcode 0$bbcode_img 0) {

  if (
$word_wrap && $text != "") {
    
$text preg_replace("/([^\n\r ?&\.\/<>\"\\-]{".$word_wrap."})/i"" \\1\n"$text);
  }

  if (
$html == || $html == 2) {
    
$text safe_htmlspecialchars($text);
  }


Very strange.

What about something in admin_functions?

14
Hi,

I have a problem with the additional field "textarea".

To go to a new line I have to use <br />. I don't have to do that in the image_description texterea.

How can I solve that? Maybe I changed something, but I cannot remember.

Thanks in advance for your help.
Cruxy

15
Hi Andy,

Thanks for the support.

NB: You mean: (details.html) :wink:


I think you didn't understand my question. I am talking here about the aditional tags like:
Code: [Select]
Added more conditional tags (categories, details,index, member, postcards, register, search, top) for using {if index}...{if index} for homepage, {if details}...{endif details} for details.php page, etc.


That means if I am on the page cities.php, it will show something, otherwise nothing.

I believe I know the problem:
When I am on the page cities.php and I use: {if page_cities}something{endif page_cities} is shows nothing, but when I use {ifnot page_cities}something{endifnot page_cities} is shows the work something.

The program does not recognize the page cities.php. So we have to declare this page or all additonal pages in I think global.php. But I am not sure.


Solved:
I solved by adding this line in cities.php:
define('MAIN_SCRIPT'__FILE__);


Thanks anyway for trying to help :wink:

Pages: [1] 2 3 4 5 ... 34