1
Hober
Re: Order of Links in Main Menu
  • 2003/11/7 23:40

  • Hober

  • Just popping in

  • Posts: 40

  • Since: 2003/6/13


Adding links is yucky, reordering them is easy.

Go to your module administration page (where you add and remove modules) and change the weight of the various modules. Heavier modules go lower, lighter ones go higher.



2
Hober
Re: Removal of post listing cap in userinfo.php
  • 2003/11/7 23:34

  • Hober

  • Just popping in

  • Posts: 40

  • Since: 2003/6/13


I'm looking at line 34 of newbb/include/search.inc.php, where it makes an SQL query. If you look at the end, where it says WHERE f.forum_type=0 might be it checking if the forum is protected.

$sql "SELECT p.post_id,p.topic_id,p.forum_id,p.post_time,p.uid,p.subject FROM ".$xoopsDB->prefix("bb_posts")." p LEFT JOIN ".$xoopsDB->prefix("bb_posts_text")." t ON t.post_id=p.post_id LEFT JOIN ".$xoopsDB->prefix("bb_forums")." f ON f.forum_id=p.forum_id WHERE f.forum_type=0";


You might try adding a quick fix to disable that

$sql "SELECT p.post_id,p.topic_id,p.forum_id,p.post_time,p.uid,p.subject FROM ".$xoopsDB->prefix("bb_posts")." p LEFT JOIN ".$xoopsDB->prefix("bb_posts_text")." t ON t.post_id=p.post_id LEFT JOIN ".$xoopsDB->prefix("bb_forums")." f ON f.forum_id=p.forum_id WHERE f.forum_type=0[color=FF0000] OR ''=''[/color]";


But don't take my word for it, and be ready to change it back if it doesn't work.



3
Hober
Re: For REGEX GURU
  • 2003/11/7 23:24

  • Hober

  • Just popping in

  • Posts: 40

  • Since: 2003/6/13


Put this around line 77 of register.php
if ( !preg_match("/^.+[0-9]{2}[m|c|e|pr|me|ch|ec|mi|cs]{1}$/",$uname) ) {
  
$stop .= sprintf("Your username is not formatted correctly<br />");
}



4
Hober
Re: desperately need help tracking and banning trolls.
  • 2003/11/7 23:07

  • Hober

  • Just popping in

  • Posts: 40

  • Since: 2003/6/13


This is an ugly topic, in my own experience trying to create CMSs, effectively banning people is extremely difficult. For example, most of my visitors are using dailup service, which makes it impossible to ban them by IP address, as you'll just wind up intermittantly banning other people, I couldn't ban IP ranges without locking out huge parts of my user base. The best solution I ever came up with was to set cookies that make people banned, but anyone with a reasonable grasp of internet technology could get around that one.

Banning people is hard.



5
Hober
Re: Idea about customizing user profile data
  • 2003/11/7 22:39

  • Hober

  • Just popping in

  • Posts: 40

  • Since: 2003/6/13


Just another quick thought, it relies on gzip compression, which could be a problem, does anyone know of any other broadly supported/used compression systems?



6
Hober
Re: Idea about customizing user profile data
  • 2003/11/7 22:38

  • Hober

  • Just popping in

  • Posts: 40

  • Since: 2003/6/13


Basically what it does is pass along the field names of the form in a compressed hidden field (for some reason IE won't pass that along except as POST, but maybe somebody else could figure that out), then it will do one of several things, and load the result into a class variable called found_results. All of this comes after calling $gt_form->get_results().

on a field that allows multiple select, it will check for the names of the checkboxes or listbox entries and load all the ones that are found into an array. i.e. if you have a field of checkboxes called "expressions" with the fields "smile" "frown" and "grimace", and select "smile" and "grimace", the recieving page will look for POST['expressions_smile'] = on, POST['expressions_frown'] = on and POST['expressions_grimace'] = on, and find that you have selected smile and frown, and add $this->found_data['expressions'][] = 'smile' and $this->found_data['expressions'][] = 'grimace'. If it finds post input that doesn't fit into the fields defined it will either ignore it, or if it were, for instance, a radio button value that isn't listed, return false.

It can also pull the options multiple selection fields from a seperate file, which currently uses my gt_data flat file data storage/retrieval class, but I think that could be changed pretty easily.

Another feature it has, that might not be so useful, is a function to sort the results into a multidimensional array. By calling for instance:
$settings['named']['uinfo'] = 'uname, password, home';
$settings['misc'] = 'otherinfo';
$sorted_results gt_form::sort_results($settings);


Would make an array $sorted_results containing two keys 'uinfo' and 'otherinfo', 'uinfo' holding 'uname' 'password' and 'home', and 'otherinfo' holding any other submitted fields.

Right now I'm still fixing it up a little, like making it at least assign a placeholder to empty fields, instead of just not setting them.

I'll put the code of some of my other classes online sometime in the next few days, I have a whole section of my website devoted to them . here



7
Hober
Re: Contact module hack
  • 2003/11/7 16:37

  • Hober

  • Just popping in

  • Posts: 40

  • Since: 2003/6/13


Define the message as a constant in the language files of the two languages you want, then call that constant from the module.



8
Hober
Re: Idea about customizing user profile data
  • 2003/11/7 16:35

  • Hober

  • Just popping in

  • Posts: 40

  • Since: 2003/6/13


I've created a class for the creation of forms and the validation of submitted data. Maybe that could help.

What it does is let you define a form item from an array where you say what kind of input, what responses can be allowed (for text). It also lets you do multiple choice responses of various types (checkboxs, listbox, radio buttons, the works). I think it might be useful here because it automagically sorts form values into an array and
people could add about 6 lines of code to their module for each field they want to add.

I have a weak demo of an old version here and the equally out of date source code is here



9
Hober
Re: User Amount
  • 2003/10/29 0:01

  • Hober

  • Just popping in

  • Posts: 40

  • Since: 2003/6/13


I'm looking at it some more, and I've revised my opinion to:



I would suggest waiting for some bigwig with a more in depth knowledge of XOOPS to come along and explain how XOOPS stores, retrieves, updates etc. A user's post count. I must admit that I'm now a little curious myself.



10
Hober
TheaterMan 2.1 (surveys!)
  • 2003/10/28 23:32

  • Hober

  • Just popping in

  • Posts: 40

  • Since: 2003/6/13


I'm working on a new feature for TheaterMan 2.1 that allows you to add a survey to instances. The surveys are very customizable (allpolls.php, which handles everything about creating surveys is currently 1200 lines and 60K, and far from finished) and pretty nice looking too. I'll probably have a working beta in the next two weeks, so if anyone wants to get in on that, let me know.

I'm also probably going to split off the code for surveys and turn it into a totally seperate module. I've noticed a lack of good survey modules, so I'll try to change that. Some people, after all, might want to collect more information than the basic polls module allows.




TopTop
(1) 2 3 »



Login

Who's Online

216 user(s) are online (132 user(s) are browsing Support Forums)


Members: 0


Guests: 216


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits