We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
  • Pages:
  • 1
  • 2
Extra Blogging Options (+Post count, +Board Feed)
Topic Started: Sep 1 2010, 07:40 PM (3,988 Views)
Viral
Member Avatar
Viral
[ *  *  *  *  *  * ]
What This Does: This modification increases users post counts by 1 when making a new entry or commenting on an existing blog entry. Not only that, but it adds the action to the board feed to alert other users that you have commented/ made a new entry. You are able to select which groups get the incremented post count and board feed update as well.
Preview: http://s1.zetaboards.com/ViralCodes/blog/main/842/ - http://s1.zetaboards.com/ViralCodes/stats/feed
Browsers: Should work in all, tested in firefox 3.
Installation:
1 - Go to your ACP and create a new forum (ACP >> Forum Sections >> Create Sections)
2 - Click the first option, Normal Forum
3 - Call it whatever you want, but make sure Posts count towards a user's personal count: is set to yes.
For the Forum Permissions, it gets a bit complicated. For now, set it so staff can view, read, start and reply. Then if you want any other group to get the incremented post count and board feed update, set it so they can read and reply. They must not be able to view/start/upload in the forum.
4 - Go back to the board, find the newly created forum and make a note of the forum ID. This will be found in the address bar when you go to the forum. For example if it is http://s1.zetaboards.com/ViralCodes/forum/7361/, the forum ID are the numbers at the end, in this case 7361.
5 - Create a new topic, call it whatever you want, and the post can be whatever you want.
6 - Make a note of the topic ID. This is the number after /topic/ in the address bar when viewing the topic. For example, if the topic is http://s1.zetaboards.com/ViralCodes/topic/3751901/2/#new, then the topic ID is 3751901.
7 - Go back to the ACP and change the forum permissions of the forum you made. Set it so staff cannot view//start/upload in the forum any more. The only boxes that should be ticked are reply and read, and that should only be for groups which are using this feature.
8 - Add the following code to your forum (ACP >> Themes >> Board Template >> JavaScripts)
Code:
 
<script type='text/javascript' src='http://z3.ifrm.com/313/104/0/p312803/zeta_cookie.js'></script>

9 - Add the following code to your forum (ACP >> Themes >> Board Template >> Below the Board)
Code:
 
<script type="text/javascript">
//<![CDATA[
// blogging options by Viral of http://victoryroad.zetabin.com
var blogged = {
forum : 7361,
topic : 3751901,
ini : function(){
if(location.href.match(/\/blog\/3\/\d+\/?$/)){
zeta_cookie.del("blog_new");
$("form[name=posting]").submit(function(){
zeta_cookie.set("blog_new",$("form[name=posting] input[name=xc]").val(),1);
});
} else if(location.href.match(/\/blog\/entry\/\d+\/\d+\/?$/)){
if($("dl.notice.info dd:contains('Blog comment added')").size() == 1){
blogged.comment();
}
$("form[name=posting]").submit(function(){
zeta_cookie.set("blog_reply",$("form[name=posting] input[name=xc]").val(),1);
});
} else {
if($("dl.notice.info dd:contains('Blog entry added')").size() == 1){
blogged.newentry();
} else {
zeta_cookie.del("blog_new");
zeta_cookie.del("blog_reply");
}
}
},
comment : function(){
if($("form[name=posting] input[name=xc]").val() == zeta_cookie.get("blog_reply")){
entry = $("#blog_main a:first");
details = [$("#blog_comments blockquote:last").text()];
blogged.post(details);
} else {
zeta_cookie.del("blog_reply");
}
},
newentry : function(){
$.get($("#blog_sub a:contains(Post New Blog Entry)").attr("href"),function(d){
if($("form[name=posting] input[name=xc]",d).val() == zeta_cookie.get("blog_new")){
entry = $("#blog_main a:first");
details = [entry.attr("href"),entry.text()];
blogged.post(details);
} else {
zeta_cookie.del("blog_reply");
}
});
},
post : function(details){
$.get(main_url+"post/?mode=2&type=1&f="+blogged.forum+"&t="+blogged.topic,function(d){
form = $("form[name=posting]",d).parent();
post = details.length == 1 ? 'Blog Comment: ' + details[0] : 'New Blog Entry: [url='+details[0]+']'+details[1]+'[/url]';
$.post(main_url+"post/?mode=2&type=1&f=7361&t=3751901",{mode:2,type:1,f:blogged.forum,t:blogged.topic,emo:1,ast:form.find("input[name=ast]").val(),xc:form.find("input[name=xc]").val(),post:post,q:0,qhash:form.find("input[name=qhash]").val(),sd:1,fcolor:'',helpbox:'Quote Text',zbpost:0,attach1:'',mod_opts:'',sig:1,post_submit:''},function(){
zeta_cookie.del("blog_new");
zeta_cookie.del("blog_reply");
});
})
}
}
blogged.ini();
//]]>
</script>
Look near the top of the code. You'll see two numbers, they need to be changed to the number of your forum and topic that you noted down earlier. For example, if your forum number is 10 and your topic number is 46 then your code will look like:
Click to Toggle


If the code does not work properly, you may have automerging enabled on your forum. This must be disabled if you want to use this modification. This can be done by going to ACP >> Topics and Posts >> Merging Before Cutoff: Don't Merge Posts >> Merging After Cutoff: Don't Merge Posts (thanks to Solide 18 for noticing this).
Edited by Viral, Sep 2 2010, 11:06 AM.
Offline Profile Quote Post Goto Top
 
Replies:
Pando
Member Avatar
Member
[ *  *  *  *  *  * ]
Quozzo
Sep 2 2010, 12:28 AM
the only quibble is that when using a stat mod like Advanced top X statistics, then theres an entry in it with the Blog forum that anyone can go to
I was wondering if hiding the topic would solve that. Not sure if it would stop it from working though.

Great code, I tried to install it but it didn't work, and now it turns out you have a fix. :facepalm:
Offline Profile Quote Post Goto Top
 
Solide18-ZNR
Member
[ * ]
I found out what my problem was.
I had to remove post merging option. Viral, add this to your tutorial.
It's important, otherwise that code doesn't work. So you must go to ACP -> Board Preferences -> Topics & Posts.
At the bottom of the options you see 'Merging before the cutoff'. You must disable this feature if you want to use the mod. =)
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
Viral
[ *  *  *  *  *  * ]
Woops my copy and pasting skills didn't work, or worked too well I may say xD . The long code goes below the board, I'll change that. Auto merge must be off otherwise you will only get a post increment if you make a comment after someone else has done so. The blog thing will appear in the latest 10 posts in top x stats because it has to make a post to increase your post count, no way around that.
Offline Profile Quote Post Goto Top
 
.awd (R)
Member Avatar
Member
[ *  *  * ]
thanks viral, thanks a lot
Offline Profile Quote Post Goto Top
 
AzureKiraZx
Member Avatar
Rock it!
[ * ]
Viral, I can´t Make it work, I have done everything and it doesn´t work
Offline Profile Quote Post Goto Top
 
Geoffrey
Member Avatar
bury hatchets, keep maps
[ *  *  *  *  * ]
Nice mod Viral. Never would've thought of such an idea. :D
Offline Profile Quote Post Goto Top
 
romblomanon-ZNR
Member
[ * ]
i cant make it work on my forum too.. do i need to have a 3rd party blog how to link it?
Offline Profile Quote Post Goto Top
 
ItsZippy
Member
[ * ]
I have automerging on and it's really useful to my forum. Is it possible for you to release a code that works with automerging on?
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
Viral
[ *  *  *  *  *  * ]
ItsZippy
Dec 5 2010, 12:09 PM
I have automerging on and it's really useful to my forum. Is it possible for you to release a code that works with automerging on?
Not possible =\ .

To others, I don't have proper internet access yet so my time is limited (and I have no firebug) so I can't help with errors >< .
Offline Profile Quote Post Goto Top
 
Quozzo
Member Avatar
By the blood of Sanguinius!
[ *  *  *  *  * ]
@ romblomanon
It works with ZetBoards Blogs, you need to have enabled users to make them in the Admin CP
Offline Profile Quote Post Goto Top
 
chtaff-ZNR
Member
[ * ]
Very nice and yes..this would be great if new blog updates was added to the board feed in future updates...

Was wondering...if we weren't worry about post counts, but just wanted to show a new blog entry in the board feed, is it possible to do so or is creating a new forum required?
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
Viral
[ *  *  *  *  *  * ]
Turn post increment off for the forum ;) .
Offline Profile Quote Post Goto Top
 
Yuri Jacobs
Member Avatar
Member
[ *  * ]
Viral
Jan 17 2011, 06:48 PM
Turn post increment off for the forum ;) .
Quote:
 
The blog you have requested does not exist.
Error Code: 31003:6049602


I added your codes to my forum's board templates. The blog was working before I even added these codes. Now, I don't anything blog related. Now what do I do? Solide18, at first when read and reply only was check for Staff in my board, I can't find the blog. But, when "View" is checked for staff, I can see my blog in the subforum. Don't know what else to say.
Edited by Yuri Jacobs, Mar 28 2011, 08:51 PM.
Offline Profile Quote Post Goto Top
 
sarchabid
Member Avatar
Member
[ * ]
The commenting part doesn't seem to work for me


(Sorry for the super necro bump I just noticed this topic!)
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards Codes & Modifications · Next Topic »
Add Reply
  • Pages:
  • 1
  • 2