Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 11:21:09 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155556 Posts in 21715 Topics by 7737 Members
Latest Member: gx-world
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: newsmodule modify modify.php to set items active / inactive  (Read 313 times)
Bug

Offline Offline

Posts: 188


« on: November 16, 2011, 11:03:05 AM »

I want to add a sort of a switch to make it easy to set items active / inactive form the modify page

I guess it has to be something like this:
Code:
<?php $database->query("UPDATE ".TABLE_PREFIX."mod_news_posts SET active = '0' WHERE item_id = '$post['item_id']'"); ?>
//
and
//
<?php $database->query("UPDATE ".TABLE_PREFIX."mod_news_posts SET active = '1' WHERE item_id = '$post['item_id']'"); ?>

There has to be an easy way to do this

I know I cannot just make a a href=" " ... and put the php code in...

can anyone tell me how to make a linkbutton to create this option

(this would also be a fantastic option for bakery)
Logged
Luisehahne
Board Member
Development Team
*****
Offline Offline

Posts: 3147



WWW
« Reply #1 on: November 16, 2011, 11:40:25 AM »

Hi,

Quote
I know I cannot just make a a href=" "
the new outputfilter look for it and replace an empty href with href="/"

Please wait for ServicePack 2 that is still in test.

Dietmar
Logged

We are human beings - and nobody is perfect at all.
Bug

Offline Offline

Posts: 188


« Reply #2 on: November 16, 2011, 12:24:58 PM »

thanks but I just want to add a function to the newsmodule...

I guess it has to be something like page up and page down function which triggers an external php file ...

Logged
Bug

Offline Offline

Posts: 188


« Reply #3 on: November 18, 2011, 07:11:39 AM »

Yesterday i noticed guestbook has a direct switchbuttonlinkthi ng to set messages active/inactive (the red /green button).. That is exactly what i would like to have at newsposts. I haven't looked at the code yet and I hope i can use that kind of a thing in news too
Logged
dbs
WebsiteBaker Org e.V.

Offline Offline

Posts: 3719


WWW
« Reply #4 on: November 18, 2011, 07:53:07 AM »

you find in foldergallery 1.31 the same function. maybe it helps too.
Logged

Bug

Offline Offline

Posts: 188


« Reply #5 on: November 18, 2011, 08:18:26 AM »

Thank you very much, never tried foldergallery, will install it and have a look



As far as I can see only a few things to add to my expanded newsmodule

- the option to set items active /inactive at modify.php
- finish the implementation of optional caroufredsel slider option for item overview page
- option to automatically add addthis-share links to a message (not too hard, just thought of it yesterday)
- option to automatically add message to twitter (haven't dived into this yet)

If these things are done I will make it available
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!