Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
[MOD] F.A.Q Staff
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2008-08-14 19:56:03
Good evening

I do this mode faqstaff for my site so that members of staff find answers to their questions without asking me every time.

This is my first code that could be useful for other, up to you to judge (on my test version 2.03).

In mysql create:

CREATE TABLE `faqstaff` (
`id` int(10) NOT NULL auto_increment,

`type` set('categ','item') NOT NULL default 'item',

`question` text NOT NULL,

`answer` text NOT NULL,

`flag` set('0','1','2','3') NOT NULL default '1',

`categ` int(10) NOT NULL default '0',

`order` int(10) NOT NULL default '0',

PRIMARY KEY  (`id`)

) TYPE=MyISAM AUTO_INCREMENT=66 ;

INSERT INTO `faqstaff` (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES

(1, 'categ', 'Information on the staff', '', '1', 0, 1),

(2, 'categ', 'Information on the panel', '', '1', 0, 2),

(3, 'categ', 'Information on the recruitments', '', '1', 0, 3),

(4, 'categ', 'Information on the Members', '', '1', 0, 4),

(5, 'categ', 'Information on the Power user', '', '1', 0, 5),

(6, 'categ', 'Information on the VIP', '', '1', 0, 6),

(7, 'categ', 'Information on the Uploader', '', '1', 0, 7),

(8, 'categ', 'Information on the Moderator', '', '1', 0, 8),

(9, 'categ', 'Information on the Supervisor', '', '1', 0, 9),

(10, 'categ', 'Information on the Administrator', '', '1', 0, 10),

(11, 'categ', 'Information on the torrent', '', '1', 0, 11),

(12, 'categ', 'Information on the ratio', '', '1', 0, 12),

(13, 'categ', 'Information on the forum', '', '1', 0, 13),

(20, 'item', 'Information on the staff?', 'Answer:', '1', 1, 1),

(21, 'item', 'Information on the panel?', 'Answer:', '1', 2, 1),

(22, 'item', 'Information on the recruitments?', 'Answer:', '1', 3, 1),

(23, 'item', 'Information on the Members?', 'Answer:', '1', 4, 1),

(24, 'item', 'Information on the Power user?', 'Answer:', '1', 5, 1),

(25, 'item', 'Information on the VIP?', 'Answer:', '1', 6, 1),

(26, 'item', 'Information on the Uploader?', 'Answer:', '1', 7, 1),

(27, 'item', 'Information on the Moderator?', 'Answer:', '1', 8, 1),

(28, 'item', 'Information on the Supervisor?', 'Answer:', '1', 9, 1),

(29, 'item', 'Information on the Administrator?', 'Answer:', '1', 10, 1),

(30, 'item', 'Information on the torrent?', 'Answer:', '1', 11, 1),

(31, 'item', 'Information on the ratio?', 'Answer:', '1', 12, 1),

(32, 'item', 'Information on the forum?', 'Answer:', '1', 13, 1);

Now open admincp.php and find:

Now open login_block.php and find:

<td align="center"><a href=faq-manage.php><img src="images/admin/faq.png" border=0 width=32 height=32><br>FAQ</a><BR></td>
add after:


<td align="center"><a href=faqstaff-manage.php><img src="images/admin/faqstaff.png" border=0 width=32 height=32><br>F.A.Q<br>Staff</a></td>



Upload this image to images/admin as faqstaff.png:

<? if ($CURUSER["control_panel"]=="yes") {print("<a href=admincp.php>" . STAFFCP . "</a>");}?>



add after:



<? if (get_user_class() >= 5){print("<br><a href=faqstaff.php><b>F.A.Q Staff</b></a>");}?>



Uploader files at the root: [url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=2752"]faqstaff.rar[/url]



Now it remains only completed sections  :blink: .
loginstaff.png
loginstaff.png
panelstaff.png
panelstaff.png
managestaff.png
managestaff.png
faqstaff.rar
Download
Unknown User
2008-08-14 20:15:45
wow this is great, thanks much!
Unknown User
2008-08-29 20:10:12
Woooooow greeeet job thank you very much
2011-01-13 19:09:28
Big thanks OGGY  :rolleyes:

V2.06

Just a small bug, I can not delete. But I can edit.

~~~~~~~~~~~~~~~~~~~~//

Juste un petite bug, je peux pas supprimer. Mais je peux editer.

@ +
Unknown User
2011-01-14 04:05:00
is this the mod u are onabout lol? when u posted in premium i thought u ment it was the offical faq system
2011-01-14 19:03:49
"djhowarth, post: 69460":
is this the mod u are onabout lol? when u posted in premium i thought u ment it was the offical faq system
lui la version officel 2.06 je pouvais pas editer en plus de pas pouvoir supprimer, la ici avec lui je peux editer  ,mais je peux  pas supprimer!

~~~~~~~~~~~~~~~~~~~~~~~~//

Version 2.6 officel him I could not edit in addition to being able to delete it here with him I can edit, but I can not delete!

sorry for my English rotten!
Unknown User
2011-10-26 12:42:25
Hello if someone tells me that in version 2.07 of mod? as an error to try

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\bj\faqstaff-manage.php on line 25

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\bj\faqstaff-manage.php on line 32

could someone inform me?

// make the array that has all the faqstaff in a nice structured

$res = mysql_query("SELECT `id`, `question`, `flag`, `order` FROM `faqstaff` WHERE `type`='categ' ORDER BY `order` ASC");

while ($arr = mysql_fetch_array($res, MYSQL_BOTH)) {    <<<<<<<<<<  erro 25

$faqstaff_categ[$arr[id]][title] = $arr[question];

$faqstaff_categ[$arr[id]][flag] = $arr[flag];

$faqstaff_categ[$arr[id]][order] = $arr[order];

}

$res = mysql_query("SELECT `id`, `question`, `flag`, `categ`, `order` FROM `faqstaff` WHERE `type`='item' ORDER BY `order` ASC");

while ($arr = mysql_fetch_array($res, MYSQL_BOTH)) {             <<<<<erro 32

$faqstaff_categ[$arr[categ]][items][$arr[id]][question] = $arr[question];

$faqstaff_categ[$arr[categ]][items][$arr[id]][flag] = $arr[flag];

$faqstaff_categ[$arr[categ]][items][$arr[id]][order] = $arr[order];

}

if (isset($faqstaff_categ)) {
Unknown User
2011-10-26 13:19:28
did u insert the sql table?
Unknown User
2011-10-26 22:08:54
I did so, she already deleted and created again but nothing came of it not
Unknown User
2011-10-26 22:10:59
you on the svn version ? you may need to replace all the mysql_query with SQL_Query_exec

ill test tommorow and post my results
Unknown User
2011-10-26 22:15:08
I'll try today when it comes to work in a place I return here to their friends if they have the same problem i thank you friend ...
Unknown User
2011-10-26 22:22:34
if what i said works cant you please report back ;)
Unknown User
2011-10-27 11:18:45
It did not work but do not change the error and open the page: ( ;)
Unknown User
2011-10-27 18:04:00
Would it make it easier if i changed the svn code to have a section for staff??
Unknown User
2011-10-30 16:08:35
good night my friends for a light RSSS ..

Well I created the table in the database so that when I opened the page says that is not because the table will be?

Table 'ton.faqstaff' does not exist  ;)

consulta SQL:

CREATE TABLE  `faqstaff` (

`id` INT( 10 ) NOT NULL AUTO_INCREMENT ,

`type` SET(  'categ',  'item' ) NOT NULL DEFAULT  'item',

`question` TEXT NOT NULL ,

`answer` TEXT NOT NULL ,

`flag` SET(  '0',  '1',  '2',  '3' ) NOT NULL DEFAULT  '1',

`categ` INT( 10 ) NOT NULL DEFAULT  '0',

`order` INT( 10 ) NOT NULL DEFAULT  '0',

PRIMARY KEY (  `id` )

) TYPE = MYISAM AUTO_INCREMENT =66;

Mensagens do MySQL :

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM AUTO_INCREMENT=66' at line 10
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 8
  • Members: 0
  • Guests online: 8
  • Comments: 3
  • Messages: 1,728