MemHT Portal is a Free PHP CMS and Blog
It permit the creation and the management online of websites with few and easy steps.
It's completelly customizable, expandable and suitable for all needs.
Moderators: Moderators
Page 1/2 1 2 >
Forum RSS feedReply
New Small fix in forum
AuthorText
-ROL-
Just arrived
Avatar

Posts: 9
Contributes: 6

Gender: _NEUTRAL_
Online: No
Date: 08/09/2008 10:38
New Small fix in forum
#post11674
Hi. I make a small fix in pages/forum/index.php

Fix made in forum posts visible buttons "Delete" and "Edit" only for Admins Moderators and topicstarter. All other users can view "Edit" Button only in our posts.

line 1263
code

        $postStructure = "";
        $postStructure .= "<tr><td width='20%' class='forum_post' valign='top'>$authorinfo</td><td width='80%' class='forum_post' valign='top'>\n";
       
                $postStructure .= "<table width='100%' cellspacing='0' cellpadding='0'>";
                        $postStructure .= "<tr><td class='forum_post_minititle'>"._DATE_.": $post_date$subtitle</td><td class='forum_post_minititle' align='right' valign='top'><a name='post$post_id' id='post$post_id'>#post$post_id</a></td></tr>";
                        $postStructure .= "<tr><td colspan='2'><div style='padding: 15px 0;'>$post_text</div>$plus$user_signature</td></tr>";
                $postStructure .= "</table>";
        $postStructure .= "</td></tr>\n";
        $postStructure .= "<tr><td colspan='3' class='forum_post' align='right'>";

//*** added by -ROL- **//
if (isAdmin($admin)  isModerator($forumid,$user)) {
        $postStructure .= "<a href='http://www.memht.com/index.php?page=forum&op=deletePost&id=$post_id' title='"._DELETE_."' rel='nofollow'><img src='templates/".$siteConfig['template']."/images/forum/buttons/delete.gif' border='0' alt='Delete'></a>";}
if (isAdmin($admin) OR isModerator($forumid,$user) OR $user==$post_author) {
        $postStructure .= "<a href='http://www.memht.com/index.php?page=forum&op=editPost&id=$post_id' title='"._EDIT_."' rel='nofollow'><img src='templates/".$siteConfig['template']."/images/forum/buttons/edit.gif' border='0' alt='Edit'></a>";}

        $postStructure .= "<a href='http://www.memht.com/index.php?page=forum&op=reply&id=$threadid&quote=$post_id' title='"._QUOTE_."' rel='nofollow'><img src='templates/".$siteConfig['template']."/images/forum/buttons/quote.gif' border='0' alt='Quote'></a>";
        $postStructure .= "</td></tr>\n";
        $postStructure .= "<tr><td colspan='3' class='forum_spacer'> </td></tr>\n";

        return $postStructure;
 

Delete Edit Quote
 
-ROL-
Just arrived
Avatar

Posts: 9
Contributes: 6

Gender: _NEUTRAL_
Online: No
Date: 08/09/2008 10:50
Re: New Small fix in forum
#post11675
Now i'm found a bug in [ code ] tag
Can u make place text in tag "as is"?
Delete Edit Quote
 
mem
MemHT's Dad
Admin & Developer

Avatar

Posts: 5137
Contributes: 2480

Gender: _MALE_
Online: No
Date: 08/09/2008 13:13
Re: New Small fix in forum
#post11678
What bug?
Delete Edit Quote
 
-ROL-
Just arrived
Avatar

Posts: 9
Contributes: 6

Gender: _NEUTRAL_
Online: No
Date: 08/09/2008 14:10
Re: New Small fix in forum
#post11681
For Example see source line $postStructure .= " not contained http://www.memht.com but in my previous post in tag [ code ] my copypaste $postSource <a href contain full link to YOUR portal Smile
Delete Edit Quote
 
mem
MemHT's Dad
Admin & Developer

Avatar

Posts: 5137
Contributes: 2480

Gender: _MALE_
Online: No
Date: 08/09/2008 14:16
Re: New Small fix in forum
#post11682
You shouldn't copy and paste from a html page into a html editor, obviously it will copy and paste the style (colors etc), its not a bug of MemHT, is NORMAL for the whole WEB and all WYSIWYG editors
Delete Edit Quote
 
-ROL-
Just arrived
Avatar

Posts: 9
Contributes: 6

Gender: _NEUTRAL_
Online: No
Date: 08/09/2008 15:08
Re: New Small fix in forum
#post11685
OK. IMHO is not correct. Source code must write "as is".

For example again. If i now copy from [ code ] tag from first post and paste in my php source I have full inks to your site. $postStructure .= "<a href='http://www.memht.com ....
Edited: 08/09/2008 15:10
Delete Edit Quote
 
mem
MemHT's Dad
Admin & Developer

Avatar

Posts: 5137
Contributes: 2480

Gender: _MALE_
Online: No
Date: 08/09/2008 15:19
Re: New Small fix in forum
#post11686
I'm copying and pasting with absolutely no problems

Anyway it cannot be "fixed" because i don't see the problem, i don't know WHAT to fix
Delete Edit Quote
 
-ROL-
Just arrived
Avatar

Posts: 9
Contributes: 6

Gender: _NEUTRAL_
Online: No
Date: 08/09/2008 17:40
Re: New Small fix in forum
#post11694
OK.Sorry. my BAD English. Another way, in pictures.

Shot1. Open example pages/forum/index.php file in editor (notepad) Smile. Select a part a source and copy. (Red line marked a trouble). Here is no problem.

Shot2. Now paste in forum to [ code ] tag. Also no problem. (Red ellipse) Paste normally.

Shot3. Now send post to forum. In red ellipse after send added full link to site. http://www.memht.com/

Thanks.
Attachment: shots.zip
Delete Edit Quote
 
mem
MemHT's Dad
Admin & Developer

Avatar

Posts: 5137
Contributes: 2480

Gender: _MALE_
Online: No
Date: 08/09/2008 17:54
Re: New Small fix in forum
#post11695
I don't know, i cannot replicate it
Delete Edit Quote
 
-ROL-
Just arrived
Avatar

Posts: 9
Contributes: 6

Gender: _NEUTRAL_
Online: No
Date: 08/09/2008 18:08
Re: New Small fix in forum
#post11697
OK. Smile this trouble is offtop.

Do you try my mod?
Delete Edit Quote
 
Reply
Page 1/2 1 2 >
Tags Cloud
Advertising
News Archive
Language
Help MemHT Portal
Navigator
Users Block
Hi Guest
IP: 38.103.63.59

Username
Password
New files
MemHT Wiki
Friends
MemHT Portal is a free software released under the GNU/GPL License by Miltenovik Manojlo