![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 14 Pomógł: 0 Dołączył: 8.07.2010 Ostrzeżenie: (0%) ![]() ![]() |
Jestem nowy, jak zły dział to proszę przenieście.
Czy ktoś z was potrafi napisać kod PHP do wtyczki MyStore do mybb? MyStore jest to sklep, w którym coś kupujemy. Niestety ale tamte przedmioty są że tak powiem, lipne. Czy ktoś z was potrafi napisać krótki kod aby poprzez ten sklep można byłoby kupić: Usnięcie ostrzeżenia? Oto kod jednego z przedmiotów z tej wtyczki może się komus przydać. Cytat <?php function store_stickythread_settings() { $settings=array(array("id"=>"excludedfids","desc"=>"Enter any fids where users can't pin threads. Separate with a comma","title"=>"Excluded Forums","type"=>"textbox")); return $settings; } function store_stickythread_requirements() { $requirements=array(array("id"=>"tid","title"=>"Please enter the thread ID here.","desc"=>"")); return $requirements; } function store_stickythread_purchase() { global $item,$mybb,$db; $settings=unserialize($item['settings']); $forums=explode(",",$settings['excludedfids']); $tid=$db->escape_string($_POST['tid']); $thread=$db->fetch_array($db->simple_select("threads","fid","tid='$tid'")); if (in_array($thread[fid],$forums)) { error("You can sticky threads in this forum"); } else { $db->update_query("threads",array("sticky"=>1),"tid='$tid'"); redirect("store.php","Thread has been successfully stickied"); }} ?> Bardzo proszę was o pomoc, Z góry bardzo dziękuje. Pozdrawiam |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 19.07.2025 - 15:47 |