Bravo List
Register
Go Back   > Bravo List > Source Code > Trackers > TBDev > Mods & Themes
Reply
  #1  
Old 06-11-17, 21:48
Elena's Avatar
Elena Elena is offline
Member
 
Join Date: Sep 2010
Ukraine
Posts: 6
Default News with comments
News with the possibility of commenting on them if users enter the main news.
Poster news is uploaded to the site itself.
All signs are supported! But there is one mistake with

>

With this bracket, the trail climbs on top with the addition (only the admin is visible and then 0.5 seconds). That is, if you type >_< like an anime smiley, it will be displayed normally in the news itself, but after clicking on the "Create News" button, all the text pops up on top of what you shoved there, for 0.5 seconds of time, after you will throw on the ready news with this sign. I xs what to do, I can not remove the error.

News create Admins, there is a condition on them. Only users can see and comment, the rest are sent to the main page.

In the archive files, requests to the database and folders with where to put that. I have a block file in the include / blocks. If you are not there, carry it right then. The file has a commented-out CACHE. If you have it the same, then safely remove the zakonnirovannoe and will work in the block CASH.

Yes, the MOD for version 5.0 is PHP, if you have higher - it will work, but can swear at the outdated function mysql_query.

Screenshots and archive in the attack, good luck!

You can see in action at http://tbdev-yse.tk - the test script of the latest version with GIT. You can enter by test accom:

Login: TEST
Password: TEST

In the CSS of your theme insert:
PHP Code:
input.button4 {
  
positionrelative;
  
displayinline-block;
  
font-familyArial,Helvetica,FreeSans,"Liberation Sans","Nimbus Sans L",sans-serif;
  
font-size1.5em;
  
font-weight700;
  
colorrgb(245,245,245);
  
text-shadow-1px rgba(0,0,0,.1);
  
text-decorationnone;
  
user-selectnone;
  
padding.3em 1em;
  
outlinenone;
  
bordernone;
  
border-radius3px;
  
background#0c9c0d linear-gradient(#82d18d, #0c9c0d);
  
box-shadowinset #72de26 0 -1px 1px, inset 0 1px 1px #98ff98, #3caa3c 0 0 0 1px, rgba(0,0,0,.3) 0 2px 5px;
  
-webkit-animationpulsate 1.2s linear infinite;
  
animationpulsate 1.2s linear infinite;
}
input.button4:hover {
  -
webkit-animation-play-statepaused;
  
animation-play-statepaused;
  
cursorpointer;
}
input.button4:active {
  
top1px;
  
color#fff;
  
text-shadow-1px rgba(0,0,0,.3), 0 0 5px #ffd, 0 0 8px #fff;
  
box-shadow-1px 3px rgba(0,0,0,.3), 0 1px 1px #fff, inset 0 1px 2px rgba(0,0,0,.8), inset 0 -1px 0 rgba(0,0,0,.05);
}
@-
webkit-keyframes pulsate {
  
50% {color#fff; text-shadow: 0 -1px rgba(0,0,0,.3), 0 0 5px #ffd, 0 0 8px #fff;}
}
@
keyframes pulsate {
  
50% {color#fff; text-shadow: 0 -1px rgba(0,0,0,.3), 0 0 5px #ffd, 0 0 8px #fff;}

Bump: In functions.php after the function deletetorren add:
PHP Code:
function deletenews($id) {     
    
$images mysql_fetch_array(sql_query('SELECT image1 FROM world_news WHERE id = '.$id)); 
    if (
$images) { for ($x=1$x <= 2$x++) { 
            if (
$images['image' $x] != '' && file_exists('torrents/news/' $images['image' $x])) 
                
unlink('torrents/news/' $images['image' $x]); 
        } 
    } 
    @
unlink('include/cache/Blocks_lastnews.cache'); 
    
sql_query('DELETE FROM newscomments WHERE novost = '.$id); 

Query the database from the SQL folder. Block News - CASH system. Requests for the main will go to zero (the block will not be counted). News with an additional function of blocking comments to the user.

Files from the archive to throw in the root of the site after unpacking.

Bump: In functions.php after the function deletetorren add:
PHP Code:
function deletenews($id) {     
    
$images mysql_fetch_array(sql_query('SELECT image1 FROM world_news WHERE id = '.$id)); 
    if (
$images) { for ($x=1$x <= 2$x++) { 
            if (
$images['image' $x] != '' && file_exists('torrents/news/' $images['image' $x])) 
                
unlink('torrents/news/' $images['image' $x]); 
        } 
    } 
    @
unlink('include/cache/Blocks_lastnews.cache'); 
    
sql_query('DELETE FROM newscomments WHERE novost = '.$id); 

Query the database from the SQL folder. Block News - CASH system. Requests for the main will go to zero (the block will not be counted). News with an additional function of blocking comments to the user.

Files from the archive to throw in the root of the site after unpacking.
Attached Thumbnails
01.jpg   02.jpg   03.jpg   04.jpg  

Attached Files
File Type: rar News_and_comments.rar (414.0 KB, 14 views)
File Type: zip News_and_Comment_2018-05-24.zip (17.1 KB, 2 views)
Reply With Quote
The Following User Says Thank You to Elena For This Useful Post:
DND (06-11-17)
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 03:07. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2018, vBulletin Solutions Inc.