vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Owned Forums / Diaries for your members! (https://vborg.vbsupport.ru/showthread.php?t=92546)

Andrew111888 07-19-2005 10:00 PM

Owned Forums / Diaries for your members!
 
What this hack does
This hack will allow your members to create 'diaries' (the term my site uses)--forums that are "owned" by a member or group of members. The owner(s) will be able to add and delete other owners to their diary, and modify the title/description of their diary.

How it works
When a user would like to create a diary, they will visit /forumdir/newdiary.php and submit their application (username and description of their desired diary). To prevent abuse, the application will be moved to /forumdir/queue.php. An administrator can either deny or confirm the application. If denied, the application is removed from the diary_queue table. If it is confirmed, it is removed from the diary_queue table and created as a new forum.

The file located at /forumdir/diarycp.php will include the statistics of an owner's diary(s), including post count, thread count, latest post, forum name, as well as the 'Edit Diary', 'Add Owner', and 'Delete Owner' functions.

This is only tested on 3.0.5, but I don't see why it wouldn't work on any 3.0.x install. If it doesn't work on 3.0.7 please tell me and I will update my post. Estimated install time is 5 minutes.

This hack will add one table (diary_queue.php), and you need to add 11 templates. You don't need to modify any vB files.

See readme.html for more info ;).

Version 1.0.1 released July 28, 2005 and Zip updated! Read below for details all who have installed this hack!

Version 1.0.1 should resolve all known bugs.

The following bugs should be fixed:
  • All files will be uploaded to the forum directory, not to a separate directory within the forum directory.
  • prefs.php is now known as diarycpprefs.php
  • The diary index is now /forum/diarycp.php.
  • The incorrect file paths (including image paths, navbar paths, etc.) have been resolved.
  • All MySQL queries now have a table prefix.
  • Minor template bugs have been corrected, including placing the title tags after $headinclude variable to go along with the XSS issue with Internet Explorer 6 that has been corrected in vBulletin 3.0.8. If you have already installed this hack, you will need to change the following templates to place the $headinclude value before the title tag:
    • DIARY
    • diary_editdiary_addowner
    • diary_editdiary_deleteowner
    • diary_editdiary_editdiary
    • diary_newdiary_main
    • diary_newdiary_ty
    • diary_queue_main

  • To upgrade, correct the above templates and delete the /diarycp/ directory, then follow step 2 of the installation guide minus uploading install.php.

Andrew111888 07-20-2005 07:31 AM

Screens:

Picture-1.jpg - DCP index

Picture-2.jpg - Edit Diary

Picture-3.jpg - Add Owner

Andrew111888 07-20-2005 07:32 AM

Picture-4.jpg - delete owner

Picture-5.jpg - queue for admin

Picture-6.jpg - queue for normal user

yinyang 07-20-2005 11:29 PM

wow, this is really cool. anyway you can make this for vB3.5?

Andrew111888 07-21-2005 02:27 AM

Whoops, found a small bug.

In the template diary_editdiary_addowner, change the following line:

Code:

<div class="smallfont"><a href="$vboptions[bburl]memberlist.php?do=search">Find Member</a></div>
to this (note the /):

Code:

<div class="smallfont"><a href="$vboptions[bburl]/memberlist.php?do=search">Find Member</a></div>
The zip has been updated with this fix :).

And once I install a test 3.5 forum and familiar myself with the structural differences, I will try and write this for that, too :).

Neutral Singh 07-21-2005 04:01 AM

Quote:

And once I install a test 3.5 forum and familiar myself with the structural differences, I will try and write this for that, too .
Oh I definitely want this in vB3.5.0 !!

Andrew111888 07-21-2005 05:08 AM

Depending on if I get my 3.5 test board up tomorrow, I'll try and port it then.

It requires very few changes to my files, no hooks/plugins, and as far as i know no template changes :).

webspider 07-21-2005 09:07 PM

I'm getting a small path error. The nav at the top left is off of wack. Any idea how to fix that? Further tesing has more problems. I had to look at my VB version and I'm using 3.0.7 and this hack you wrote for 3.0.5 so I'm assuming that is where the problem lies.

Go Back MyForums > Diary Control Panel
Reload this Page

Andrew111888 07-22-2005 02:53 AM

Can you explain where the path error is and what the problems you are having are (in detail)?

Skyline_GT 07-22-2005 05:02 AM

I am not clear what this do..
So it is like members can create sub forum for themselves?

webspider 07-22-2005 10:32 AM

Quote:

Originally Posted by webspider
I'm getting a small path error. The nav at the top left is off of wack. Any idea how to fix that? Further tesing has more problems. I had to look at my VB version and I'm using 3.0.7 and this hack you wrote for 3.0.5 so I'm assuming that is where the problem lies.

Go Back MyForums > Diary Control Panel
Reload this Page

Sure
1) The path error; when I open e.g. /diarycp/newdiary.php instead of seeing the file folder and forum name top left I see "Go Back myForum > Diary Control Panel Reload this Page New Diary and no image. When I click on those links I get the path /board/diarycp/diarycp/index.php instead of /board/diarycp/index.php.

2) I did a test diary and while it did post to the forums table the parentid was wrong. I'm going to try this again today.

Hoffi 07-22-2005 03:40 PM

I will take a look! It Seems that this is a Heck I planned a while ago, but never Coded it.

Andrew111888 07-22-2005 04:32 PM

Quote:

Originally Posted by webspider
Sure
1) The path error; when I open e.g. /diarycp/newdiary.php instead of seeing the file folder and forum name top left I see "Go Back myForum > Diary Control Panel Reload this Page New Diary and no image. When I click on those links I get the path /board/diarycp/diarycp/index.php instead of /board/diarycp/index.php.

2) I did a test diary and while it did post to the forums table the parentid was wrong. I'm going to try this again today.

Did you set $prefs['parentid'] to the forum you wanted to be the parent in prefs.php?

You may have done this...

Diaries (category, id 140)
-- Diaries (forum id 141)
---- Diary 1 (subforum of Diaries forum, id 142)

in which case diaries (forum) is the parent, so $prefs['parentid'] should be set to 141. This is how mine are set up anyway.

Can you screenshot this problem? As yet, I have been unable to replicate in 3.0.5... it works fine for me.

And yes Skyline_GT, they can basically create their own forums. The readme says what the permissions are set to.

webspider 07-22-2005 04:44 PM

Quote:

Originally Posted by Andrew111888
Did you set $prefs['parentid'] to the forum you wanted to be the parent in prefs.php?

You may have done this...

Diaries (category, id 140)
-- Diaries (forum id 141)
---- Diary 1 (subforum of Diaries forum, id 142)

in which case diaries (forum) is the parent, so $prefs['parentid'] should be set to 141. This is how mine are set up anyway.

Can you screenshot this problem? As yet, I have been unable to replicate in 3.0.5... it works fine for me.

My Diary category is 36 and sub would run 37, 38 etc. Are you saying that you must have
1) category
2) forum
3) diaries off forum?

Or can I have diaries off the category?

Hoffi 07-22-2005 08:20 PM

Du you have an Idea how I the "diary" Owner can Add Users that can use this Forum, without being Owner (Mod)?

The optimum would be, if a Secondary Usergroup could be added with specific Rights and the Diary Owner is the Usergroupleader.

Andrew111888 07-22-2005 08:47 PM

You mean that only the original owner can add new users to it?

@webspider: try it the way I have mine set up (Diary, Category, Diary Forum, Diaries are sub-forum of Diary Forum) and see if the problem persists.

Also, the reason it says "Go Back" etc is because you don't have the two navimages uploaded, so it's showing the alternate text for them.

webspider 07-22-2005 09:37 PM

Quote:

Originally Posted by Andrew111888
You mean that only the original owner can add new users to it?

@webspider: try it the way I have mine set up (Diary, Category, Diary Forum, Diaries are sub-forum of Diary Forum) and see if the problem persists.

Also, the reason it says "Go Back" etc is because you don't have the two navimages uploaded, so it's showing the alternate text for them.

The image paths are wrong. The way you have it coded you need two image folders plus the path to the Control Panel etc are wrong. Its simply you're not using the default VB root.

/board/diarycp/diarycp/index.php
/board/diarycp/images/misc/navbits_start.gif

Andrew111888 07-23-2005 02:22 AM

Ah, I figured out why mine doesn't have that problem.

In the StyleVars section of your Style Options, all of my paths include the full URL to my forum (http://www.boardurl.com/forum/images/). That should fix it.

Skyline_GT 07-23-2005 06:24 AM

answer my question??

Hoffi 07-23-2005 06:49 AM

Quote:

Originally Posted by Andrew111888
You mean that only the original owner can add new users to it?

I mean that tehre exits two kind of users who can use this Form. The owner(s) and Invited Users.

Let my try to explain for what I want to use it.
Im my Roleplaying Board Users can start Board-RPG's. Till now I always create Usergroups, Forums and rights by Hand, Game for Game. And we now have about 30 (active) Games and about one or two new a Month.

So this is a great beginning for a Hack I thought about.

A Place where a User can ask for a Game.
If I ack this, a board will be created with the User as a Mod in there. The Usergroup of this User (I call hin Gamemaster) changed to a special Gamemaster-Group. (Secondary group).

Now there must be a System that the Gamemaster can add Players to this Game, but the Players should not have Mod-Rights in this Forum. If I add a second Owner with your Hack, the Owner gets Mod-Status. So, a Solution could be, that a Usergroup will be created with the Forum. I'll see this Weekend what is neccesary for this and I will try to implement this, if it is OK for you.

webspider 07-23-2005 11:40 AM

Quote:

Originally Posted by Andrew111888
Did you set $prefs['parentid'] to the forum you wanted to be the parent in prefs.php?

You may have done this...

Diaries (category, id 140)
-- Diaries (forum id 141)
---- Diary 1 (subforum of Diaries forum, id 142)
I just did more tests and everytime I add a new forum the parentid gets set to 142. It looks to me like either the pref.php is not being used or you have hard coded 142 into your code.

This is from my pref.php
// Set the ParentID of the forum that your diaries will be a child of

$prefs['parentid'] = 37;

bane1 07-23-2005 01:39 PM

Sounds interesting!!! Anyone have a working example?

Andrew111888 07-23-2005 05:11 PM

@Skyline_GT: I did.

@Hoffi: You're welcome to attempt to implement it :). If you do succeed and release it as an add-on, please tell me so that I can include the add-on link in my readme.html file :).

@webspider: Indeed, when I was testing my code I left 142 hardcoded in queue.php and forgot to updated. I have since updated queue with the proper variable as well as tested it and it appears to be working fine; I have attached queue.php to this post for you to download :). Here's to hoping you have no more bugs from my hack! :P

To everyone that has installed this hack already:

1) Please download queue.php from this post and upload it over your current one to fix a bug.

2) If your logo or navbits icons are not showing up properly, please do this (from the updated readme.html:

To everyone that has yet to install this hack:

Original zip updated :).

webspider 07-24-2005 11:48 AM

Quote:

Originally Posted by bane1
Sounds interesting!!! Anyone have a working example?

No joy for me.

webspider 07-24-2005 11:51 AM

Quote:

Originally Posted by Andrew111888
@Skyline_GT: I did.

@Hoffi: You're welcome to attempt to implement it :). If you do succeed and release it as an add-on, please tell me so that I can include the add-on link in my readme.html file :).

@webspider: Indeed, when I was testing my code I left 142 hardcoded in queue.php and forgot to updated. I have since updated queue with the proper variable as well as tested it and it appears to be working fine; I have attached queue.php to this post for you to download :). Here's to hoping you have no more bugs from my hack! :P

To everyone that has installed this hack already:

1) Please download queue.php from this post and upload it over your current one to fix a bug.

2) If your logo or navbits icons are not showing up properly, please do this (from the updated readme.html:

In Admin CP -> Styles & Templates -> Style Manager -> (desired style) StyleVars, you will need to hardcode the URL for "Title Image" and "Miscellaneous Images Folder". Example: instead of /images/misc it would be http://www.siteurl.com/yourforums/images/misc to make sure your logo and navbit images will work correctly.

To everyone that has yet to install this hack:

Original zip updated :).


I'll give this a try next week when I have more time. I still don't think that using the full URL will solve the path problem but I'll give it a try. Thanks for your effort.

webspider 07-25-2005 03:12 PM

Quote:

Originally Posted by webspider
I'll give this a try next week when I have more time. I still don't think that using the full URL will solve the path problem but I'll give it a try. Thanks for your effort.

I changed my image paths and they now show correctly however the link paths are all still incorrect as stated earlier. If I hard code the index.php, newdiary.php etc with the correct path it works fine. I'm sure there is a var that can be used to correct this for all users.

$navbits = array("/board/diarycp/index.php"

I did a test forum today and now the parentid is correct. THANKS

webspider 07-25-2005 03:20 PM

Found a new bug:-(

When I access editdiary.php I get a blank page, I can not find any errors in my php error.log though.

webspider 07-25-2005 03:30 PM

Do you have any suggestions as to how to link this hack so users can access it?

Andrew111888 07-25-2005 05:03 PM

editdiary.php is blank if you don't specify an action or forumid (http://www.blah.net/forum/diarycp/ed...id=x&do=foobar)

That's why there's index.php :).

I tried to fix the URL error that you needed to hardcode by putting $vboptions['bburl'] in the navbit link, but on my installation that made it http://www.blah.net/forum/http://www...rycp/index.php but I will keep looking for a solution.

Just put a link anywhere on your site to $vboptions[bburl]/diarycp/ and that should work for others to access it.

webspider 07-25-2005 07:08 PM

Quote:

Originally Posted by Andrew111888
I tried to fix the URL error that you needed to hardcode by putting $vboptions['bburl'] in the navbit link, but on my installation that made it http://www.blah.net/forum/http://www...rycp/index.php but I will keep looking for a solution.

You need to define somewhere where the board root is. Changing the $navbits arrayto $navbits = array("index.php" => fixed part of the problem. But the the main nav link does not bring me back to the board root.

MikaK 07-27-2005 08:49 AM

I?ve also encountered a few "bugs". I have installed this on a vB 3.0.3 board.

Quite many tableprefixes are still needed, otherwise creating sql errors. Hardcoded those to my best skill...

Navbar is messed when viewing any pages in diarycp
  • popup functionalities are gone
  • any links point to .../forum/diarycp/... instead of .../forum/...
Style problem: gradients I use for "tcat" and "thead" doesn?t show properly. I have the images/misc and others hardcoded as advised.

Last Post threads listed at index.php point to .../forumshowthread.php?t=12221 instead of .../forum/showthread.php?t=12221

About changing user permissions:
I think, I Got this one nailed. For anyone interested: I Changed editdiary.php row 71 and queue.php row 67 to values 1048831 (the last value added). This adds the capability to moderate posts and attachments.

Regs,
-M

Andrew111888 07-28-2005 09:52 PM

I think tonight or tomorrow I'm going to rewrite this so that it stays in the /forum/ directory to avoid all of these directory issues.

As far as I know all queries use prefix tables as this is the first bug of this nature, but I will review this as well when I rewrite the hack a bit so that it goes in /forum/.

I will update my zip either today or tomorrow as mentioned with the "new" hack.

f-a_org 07-28-2005 11:32 PM

Am I the only person, who has blank pages when I visit them ?
I just installed, them and all the diarycp pages are blank...

Andrew111888 07-29-2005 02:23 AM

Version 1.0.1 of the Diary CP / Owned Forums is out that resolves all known bugs as well as addresses the 3.0.8 XSS issue in IE6.

It is highly recommended that you upgrade. Please see the original post for more details, changes, bug fixes, and the new zip.

MikaK 07-29-2005 06:03 AM

Quote:

Originally Posted by Andrew111888
Version 1.0.1 of the Diary CP / Owned Forums is out that resolves all known bugs as well as addresses the 3.0.8 XSS issue in IE6.

It is highly recommended that you upgrade. Please see the original post for more details, changes, bug fixes, and the new zip.

Thanks forthe update,Andrew -and thanks for crediting me in your new install instructions!

Unfortunately here are still some issues I have encountered with my vB 303 installation:

TABLE PREFIXES I STILL NEEDED TO ADD
diarycp.php row 38 needed checking
My working row with my added scll prefixes looks like

$modsinfo = $DB_site->query("SELECT DISTINCT scllmoderator.userid, sclluser.username FROM " . TABLE_PREFIX . "moderator, sclluser WHERE scllmoderator.userid = sclluser.userid AND scllmoderator.forumid = ".$ownerdata['forumid']."");

Note: I haven?t tested this all too extensively, so there might be more. Further, I am not sure whether the above is totally correct. It works for my board.

TEMPLATE BUGFIX diary_main_forumlist
needs a / at ...$vboptions[bburl]showthread.php... around row 10

<div class="smallfont"><a href="$vboptions[bburl]/showthread.php?t=$forumdata[lastthreadid]"><strong>$forumdata[lastthread]</strong></a></div>

Note: I haven?t tested this all too extensively, so there might be more. Here again:Works for me.

NOT YET FIXED
DIARY CONTROL PANEL diarycp.php
Lists only the last blog added by a member.

Regs,
-Mika

Andrew111888 07-29-2005 05:54 PM

I believe I have now resolved all of those bugs.

Please download the attached files to correct the diarycp.php and editdiary.php table prefix issues, as well as to fix only the latest diary being displayed on diarycp.php.

Main zip updated.

webspider 07-29-2005 06:01 PM

Quote:

Originally Posted by Andrew111888
I believe I have now resolved all of those bugs.

Please download the attached files to correct the diarycp.php and editdiary.php table prefix issues, as well as to fix only the latest diary being displayed on diarycp.php.

Main zip updated.

Are you going to be coding this hack for 3.5? There are so many improvements I have found myself getting ready to flip over to the new board.

Andrew111888 07-29-2005 08:41 PM

As soon as I can get my 3.5 test board up and running it shouldn't be too hard to port over.

But alas, I'm having a cookie problem on my 3.5 board (most likely from my main 3.0.5 board) and I've been too busy to look into it.

webspider 07-29-2005 09:29 PM

I had a cookie problem as well, ended up using IE to access one and Firefox to access the other.

Andrew111888 07-30-2005 04:34 AM

Mine does this:

"Please log in."

I log in.

"Thank you for logging in."

"Please log in."

I log in.

"Thank you for logging in."

and so fourth.


All times are GMT. The time now is 03:18 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01669 seconds
  • Memory Usage 1,853KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete