3 questions

Temporary forum to obtain support for MODs/Styles while phpbb.com is down
Locked
manfred
Registered User
Posts: 5
Joined: Sat Feb 07, 2009 8:07 pm

3 questions

Post by manfred » Sun Feb 08, 2009 4:40 pm

Hi everyone ..
hope you're fine ..

I have three questions , maybe the solution is in mods ..


here is an image , I'll use it in the first two questions

Image




Question 1


is it possible to put another post counter after the original one ?
I call it "Articles" because I have a category called articles submission , I want to put a code that counts posts written only in this category ..





Question 2


two buttons that can be pushed by all registered users , love and hate buttons or something like that .. auto increment counter of course

how can I do this ??


for these two questions, places shown in the image are important ..


Question 3

Is it possible (I think so ^^ because I've seen it in other phpbb forums) , is it possible to make some restriction in posting some links ?
for example , users that have less than 10 posts can't post links ..

???

I'm using phpBB 3.03 , subsilver2 based style

thanks for answering .

manfred
Registered User
Posts: 5
Joined: Sat Feb 07, 2009 8:07 pm

Re: 3 questions

Post by manfred » Mon Feb 09, 2009 5:33 pm

any answer will be welcome .. plz , I really need thoose modifications ..
thanks

User avatar
Brf
Support Team
Support Team
Posts: 332
Joined: Sun Mar 11, 2007 1:06 pm

Re: 3 questions

Post by Brf » Mon Feb 09, 2009 5:40 pm

Moving to Mod support.
I doubt you will find much help here though. You will probably have to wait until phpbb.com is back and post there.

WinterWulf
Registered User
Posts: 14
Joined: Wed Feb 04, 2009 6:35 pm
Location: North Pole

Re: 3 questions

Post by WinterWulf » Mon Feb 09, 2009 10:43 pm

I'm not a PhpBB or Php guru, but let's see if I can't help a bit:

Question 3

Is it possible (I think so ^^ because I've seen it in other phpbb forums) , is it possible to make some restriction in posting some links ?
for example , users that have less than 10 posts can't post links ..
I belive you can fix this by going to the ACP and making anyone who posts 10+ times a part of a new group which has permision to post links. I've never actualy played with the group settings before so you might end up needing some code to make it work.

Question 2

two buttons that can be pushed by all registered users , love and hate buttons or something like that .. auto increment counter of course

how can I do this ??

for these two questions, places shown in the image are important ..
I'm still trying to get a response to my thread at
viewtopic.php?f=72&t=30612
on the topic of the correct way to do these sorts of things; however, you may find some of the links there useful. But you will still need a php/MySql script for it. Here is a script for reading the rating count in php, I hope it helps you (I give no guarentees: I know php but I'm still new at using it!):

Code: Select all

// ----------------This script will read the rating for the current topic-------------------
// Make sure to replace the values "whatever_database_you_are_using", "category_row_name_here" and "$topic"
//The $topic will need to be changed to the variable PhpBB uses to figure out which topic is being viewed

// create query 
$query = "SELECT * FROM whatever_database_you_are_using WHERE category_row_name_here = '$topic'";

// execute query 
$result = mysql_query($query) or die ("Error in query: $query. ".mysql_error()); 

// see if any rows were returned 
if (mysql_num_rows($result) > 0) { 
    // yes 
    // print them one after another. Line directly below has been commented out as it is not needed since the database has only one result to return. Remove the double backslashes to uncomment that line if you need it to print more then one result. Also remember to remove the double backslashes from the } below ( other wise you will get a syntax error ).
//    while($row = mysql_fetch_row($result)) { 
        echo "$category_row_name_here"; 
//    } 
} 
else { 
    // no 
    // print status message 
    echo "0"; 
} 

// free result set memory 
mysql_free_result($result); 
The $topic will need to be changed to the variable PhpBB uses to figure out which topic is being viewed (I'm not sure what it is called, sorry).

You will still need to edit your data base manualy or with (recomended) phpMyAdmin. You will still need to change the templates and have a $_GET php script made for changing the rating. However, you should be able to do a bit of the work by adding a custom field to the posts via the ACP.


And if you feel realy adventurious, you can even start learning a bit about php and MySQL at this wonderfull, easy reading guide:
http://devzone.zend.com/node/view/id/627


EDIT: I made an error in the code the first time I posted this - the error has now been fixxed.
Last edited by WinterWulf on Tue Feb 10, 2009 8:29 pm, edited 2 times in total.

manfred
Registered User
Posts: 5
Joined: Sat Feb 07, 2009 8:07 pm

Re: 3 questions

Post by manfred » Tue Feb 10, 2009 11:27 am

thanks for answering , WinterWulf and Brf ..

For question 3 , yeah it's a good idea WinterWulf , I think that I've seen a mod that change users rank automatically according to post count ..
still waiting for dot com to come back , so I can verify that..


For question 2 ..
to be honnest , I'm not an old phpbb user , so I can't figure out how it works, I used to other forum scripts (especially smf) ..
but I thik that we can make anything using mods .. and I'm pretty sure that ther is a karma mod or something like that dioing this modification ..
I'm waiting for some other clarifications plz ...


anybody else for the first question ??? the most important for me , without this counter , I can't use my site abilities ..
here is an example , a frensh forum for phpBB support , look at any topic , you'll find two counter , one for post , and the pther for tutorials (tutoriaux)

I asked the forum Administrator , but he is using phpBB 2 ...

any help ?

Locked