Author Topic: [Code] UserPage  (Read 2865 times)

0 Members and 0 Guests are viewing this topic.

Offline Agent Moose

  • Newbie
  • *
  • Posts: 37
  • Karma: 12
  • Gender: Male
  • Miss me?
  • Location: South Carolina, United States
    • View Profile
[Code] UserPage
« on: March 16, 2011, 07:48:25 pm »
Well, hello there :)

I have decided to re-create the UserPage code I had created for SMF For Free for CreateAForum.  It's not all up to par like the SMF For Free version, but it has the basics :)

Preview: Clicky!

Features:
  • Each user has their own page
  • Users can edit their page freely, as long as it follows the rules their page is on, and the Terms of Service for CreateAForum.
  • Users can add their own CSS
  • Users can Add their own music (Only one song for now)
  • Quick Edit feature
  • Admins can edit/Quick Edit any page
  • Report System (upgraded from SMF for Free's version of UserPage)
  • Links under "Profile" tab to view/edit your page
  • Links on profile summary to view page, and if it's your profile, or you're an admin, you get an "Edit Page" link too.

Setting up:
Create a profile Field:
Before you can create a profile field, you need to make sure that you have the Custom Profile Field addon on:
 - Go to Core Features, and under there you will see an option for "Advanced Profile Fields".  Make sure that it's on.
Now go to Features and Options > Profile Fields > New Field
Here are the options you need to set:

Quote
Name: Page Content
Description: This is the area for your page.  You may add anything you wish, as long as it follows the Terms of Service.
Profile Section: Forum Profile
Show on Registration: (Your choice)
Show on Topic View: Unchecked
Choose Placement: Standard (with title)
Field Type: Large Text
Maximum Length: 0
Dimensions:
    Rows: 10
    Columns: 30
Allow BBC: Checked
Privacy: Users can see this field; owners can edit it
Searchable: (Your choice)
Active: Checked

Quote
Name: Page CSS
Description: Insert your own CSS so your page can be unique!
Profile Section: Forum Profile
Show on Registration: (Your choice)
Show on Topic View: Unchecked
Choose Placement: Standard (with title)
Field Type: Large Text
Maximum Length: 0
Dimensions:
    Rows: 4
    Columns: 30
Allow BBC: Checked
Privacy: Users can see this field; owners can edit it
Searchable: (Your choice)
Active: Checked

Quote
Name: Page Music
Description: Insert a Music URL (.mp3, .wav, .midi, .mid) for your background music on your page.
Profile Section: Forum Profile
Show on Registration: (Your choice)
Show on Topic View: Unchecked
Choose Placement: Standard (with title)
Field Type: Text
Maximum Length: 255
Allow BBC: Checked
Input Mask: No HTML
Privacy: Users can see this field; owners can edit it
Searchable: (Your choice)
Active: Checked

Now that you have all that done, you may add this following code to your footers:
Admin > Configure > Style Manager > Footers:
Code: [Select]
<script type="text/javascript">
var ReportTo = new Array("ADMIN 1", "ADMIN 2", "MODERATOR 1", "ECT.");
</script><script type="text/javascript" src="http://z4.ifrm.com/12428/46/0/f5038014/UserPageCAF.js"></script>

You may change "ADMIN 1" ect. to the user(s) you want the reported pages to PM to.
Example:
Code: [Select]
var ReportTo = new Array("Agent Moose", "Spankr Poodle");Or if you want it to be sent to just one user:
Code: [Select]
var ReportTo = new Array("Agent Moose");

That's it!

Enjoy :)
« Last Edit: November 27, 2012, 10:56:56 pm by Agent Moose »
Code: [Select]
//Hint hint :)
if(/action=profile;u=(.*);sa=UserPage/i.test(location.href)){
var number = RegExp.$1;
var username = (smf_id_member !== "0") ? document.getElementById("upper_section").getElementsByTagName("li")[0].getElementsByTagName("span")[0].innerHTML : void(0);

Share on Facebook Share on Twitter


Offline Agent Moose

  • Newbie
  • *
  • Posts: 37
  • Karma: 12
  • Gender: Male
  • Miss me?
  • Location: South Carolina, United States
    • View Profile
Re: [Code] UserPage
« Reply #1 on: March 26, 2011, 02:43:23 pm »
If you would like to test an upgraded version of this code, you can register here:
http://usercombo.createaforum.com/index.php

I will release the code on that forum when I get all bugs out of it.
Code: [Select]
//Hint hint :)
if(/action=profile;u=(.*);sa=UserPage/i.test(location.href)){
var number = RegExp.$1;
var username = (smf_id_member !== "0") ? document.getElementById("upper_section").getElementsByTagName("li")[0].getElementsByTagName("span")[0].innerHTML : void(0);

Offline Agent Moose

  • Newbie
  • *
  • Posts: 37
  • Karma: 12
  • Gender: Male
  • Miss me?
  • Location: South Carolina, United States
    • View Profile
Re: [Code] UserPage
« Reply #2 on: March 14, 2012, 01:58:28 pm »
It's been awhile since I have released anything coding wise, but I am always updating codes (mainly UserPage :P)

I have recently did a major update on this code.  I have got the first post of this topic ready for you all, but the code isn't uploaded yet because it is on my computer, which I am not on right now.

I will inseart the code in the first post later today though :)  For now, you can look at the new features here:
http://usercombo.createaforum.com/?action=profile;u=1;sa=UserPage
Code: [Select]
//Hint hint :)
if(/action=profile;u=(.*);sa=UserPage/i.test(location.href)){
var number = RegExp.$1;
var username = (smf_id_member !== "0") ? document.getElementById("upper_section").getElementsByTagName("li")[0].getElementsByTagName("span")[0].innerHTML : void(0);

Offline aIURbliS

  • Hero Member
  • *****
  • Posts: 1215
  • Karma: 45
  • Gender: Male
  • Location: U.S.
    • View Profile
Re: [Code] UserPage
« Reply #3 on: March 19, 2012, 05:19:38 pm »
It's been 5 days, is the code ever coming?
All codes I make are tested on the latest version of Google Chrome and upon request of other browsers.

Offline Agent Moose

  • Newbie
  • *
  • Posts: 37
  • Karma: 12
  • Gender: Male
  • Miss me?
  • Location: South Carolina, United States
    • View Profile
Re: [Code] UserPage
« Reply #4 on: March 20, 2012, 02:13:50 am »
It is.  The day I posted this I noticed a problem with the code though, so I couldn't add it :\  Sorry about that.  I will get it up sooner or later, I promise.
Code: [Select]
//Hint hint :)
if(/action=profile;u=(.*);sa=UserPage/i.test(location.href)){
var number = RegExp.$1;
var username = (smf_id_member !== "0") ? document.getElementById("upper_section").getElementsByTagName("li")[0].getElementsByTagName("span")[0].innerHTML : void(0);

Offline aIURbliS

  • Hero Member
  • *****
  • Posts: 1215
  • Karma: 45
  • Gender: Male
  • Location: U.S.
    • View Profile
Re: [Code] UserPage
« Reply #5 on: April 22, 2012, 04:08:41 pm »
Been a while now o.O
All codes I make are tested on the latest version of Google Chrome and upon request of other browsers.

Offline billk123

  • Newbie
  • *
  • Posts: 21
  • Karma: 1
  • Programming
    • View Profile
Re: [Code] UserPage
« Reply #6 on: September 09, 2012, 04:01:07 am »
Is this finished yet?
Developing small code.

Offline Agent Moose

  • Newbie
  • *
  • Posts: 37
  • Karma: 12
  • Gender: Male
  • Miss me?
  • Location: South Carolina, United States
    • View Profile
Re: [Code] UserPage
« Reply #7 on: November 27, 2012, 01:53:49 am »
As I said, sooner or later.  It was more later than sooner, but it's done :D

The first post has been edited with the code.  If you find any bugs, please report it to this topic.
Code: [Select]
//Hint hint :)
if(/action=profile;u=(.*);sa=UserPage/i.test(location.href)){
var number = RegExp.$1;
var username = (smf_id_member !== "0") ? document.getElementById("upper_section").getElementsByTagName("li")[0].getElementsByTagName("span")[0].innerHTML : void(0);

Offline aIURbliS

  • Hero Member
  • *****
  • Posts: 1215
  • Karma: 45
  • Gender: Male
  • Location: U.S.
    • View Profile
Re: [Code] UserPage
« Reply #8 on: November 27, 2012, 02:04:23 am »
Agent Moose has returned!
All codes I make are tested on the latest version of Google Chrome and upon request of other browsers.

Offline Agent Moose

  • Newbie
  • *
  • Posts: 37
  • Karma: 12
  • Gender: Male
  • Miss me?
  • Location: South Carolina, United States
    • View Profile
Re: [Code] UserPage
« Reply #9 on: November 27, 2012, 02:07:59 am »
Going to be honest, probably wont be posting very long :P  Not sure how long I will be back. :P

EDIT:
Had to edit the first post.  I updated the code because it wasn't running on IE or FF from where I uploaded the code at.
« Last Edit: November 27, 2012, 02:20:02 am by Agent Moose »
Code: [Select]
//Hint hint :)
if(/action=profile;u=(.*);sa=UserPage/i.test(location.href)){
var number = RegExp.$1;
var username = (smf_id_member !== "0") ? document.getElementById("upper_section").getElementsByTagName("li")[0].getElementsByTagName("span")[0].innerHTML : void(0);

 

Related Topics

  Subject / Started by Replies Last post
12 Replies
3406 Views
Last post December 02, 2014, 06:57:57 pm
by CyanProductions
2 Replies
891 Views
Last post August 09, 2010, 02:57:38 am
by Nick9
1 Replies
823 Views
Last post March 14, 2012, 04:53:55 pm
by aIURbliS
4 Replies
210 Views
Last post May 27, 2017, 07:25:09 pm
by Egbune
2 Replies
189 Views
Last post February 02, 2020, 03:34:38 pm
by mickjav