Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Kto potrafi PHP?
Intex
post 8.07.2010, 23:31:23
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
Go to the top of the page
+Quote Post

Posty w temacie


Closed TopicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 19.07.2025 - 15:47