Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 25, 2012, 11:51:32 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Interested in joining the WebsiteBaker team?
For more Information read
here
or on our
new website
.
155532
Posts in
21713
Topics by
7738
Members
Latest Member:
Pattieardathfe
WebsiteBaker Community Forum
English
Help & Support
(Moderators:
Argos
,
badknight
)
Integrate Javascript admin in news module
Pages: [
1
]
Go Down
Author
Topic: Integrate Javascript admin in news module (Read 1487 times)
pieterb
Offline
Posts: 46
Integrate Javascript admin in news module
«
on:
January 09, 2010, 05:16:15 PM »
Hi everybody,
I am working on a website where I've modded the news module, so that I can show a calendar on the homepage with short news items from it. Now I would like to be able to drag and drop the newsitems in stead of using the arrow keys. Really exactly like with the Javascript admin turned on and then moving pages around. Is this very hard to implement? Can anybody point me in the right direction?
Furthermore, I would really like a copy function for the News module, so I can copy an existing news item and then only change the date. Again, does anyone know if this is doable for a non-programmer?
If you want to see the website, you can go to
www.comingoutday200
9.nl/cocrotterdam
. On the homepage, you will see the calendar.
Thanks in advance for your help!
Logged
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: Integrate Javascript admin in news module
«
Reply #1 on:
January 22, 2010, 01:31:37 AM »
Hi,
I really like your AGENDA block.. im curious how you did it ?
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
chio
WebsiteBaker Org e.V.
Offline
Posts: 2264
Re: Integrate Javascript admin in news module
«
Reply #2 on:
January 22, 2010, 08:25:25 AM »
I am also intersted in some help how to integrate Drag&Drop into News - and Topics, which is quite similar there.
@pieterb: A very nice and good looking site!
Logged
*weg*
pieterb
Offline
Posts: 46
Re: Integrate Javascript admin in news module
«
Reply #3 on:
January 22, 2010, 09:53:02 AM »
For the agenda block, I hired a PHP programmer. He did the fancy stuff with the agenda popping out. But I used the standard news module. The PHP script just reads out the information from the same table in the database. The look is all CSS.
I didn't get the drag and drop in the news module to work, so I made a workaround: I made an editable date field right in the news module "home screen". I also made a copy button that simply copies the database entry, so that the user only has to fill in the new date. I did this because we have many recurring agenda items.
Logged
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: Integrate Javascript admin in news module
«
Reply #4 on:
January 22, 2010, 11:53:51 AM »
Could you please post a code for Agenda, I realy like it, it could be used as a new event calendar..
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
pieterb
Offline
Posts: 46
Re: Integrate Javascript admin in news module
«
Reply #5 on:
January 31, 2010, 10:30:55 PM »
Hey everybody, my PHP programmer said it was fine to post the code. That said, it was made especially for this website, so probably there are some things that need redoing if you want to make it into a module. Please see the attachment. I've attached the complete template, so you can find the correct items for yourself.
Logged
snark
Guest
Re: Integrate Javascript admin in news module
«
Reply #6 on:
August 24, 2010, 04:48:52 PM »
hey the calendar looks great,
as I look at your template the first part is
Code:
set_include_path(
get_include_path(). PATH_SEPARATOR.
$_SERVER['DOCUMENT_ROOT']. "/include/coc"
);
I think besides the template we would also need the "include/coc" folder to get it to work ...
now I get an empty page
Logged
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: Integrate Javascript admin in news module
«
Reply #7 on:
August 24, 2010, 06:48:32 PM »
Hi,
I liked this agenda so I am willing to make a snippet from this.
My idea is to make a snippet, which can be simply adjusted with tutorial to use data from various modules (news, event and concert calendars and even more
)
to make agenda work, install the template, then open index.php of template and:
Code:
find
require_once("global.inc.php");
and replace with
require_once(WB_PATH."/templates/COChome/include/global.inc.php");
then use this ajax.txt file and rename it to ajax.php and uload it to root
Also, If you use TABLE_PREFIX, open TEMPATE_DIR/include/agenda.class.php and find and replace SQL line with:
Code:
$sql = "SELECT `title`, `content_short`, `published_when` FROM `".TABLE_PREFIX."mod_news_posts` WHERE `published_when` >= {$start_date} ORDER BY `published_when` ASC";
You will notice that I added ".TABLE_PREFIX." in SQL there..
cheers
Edit:
Of course, this is just for test purposes.. to see how agenda works...I expect not to abuse Pieter's hard work
and good will to share with us such a nice effect
«
Last Edit: August 24, 2010, 06:54:43 PM by crnogorac081
»
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
snark
Guest
Re: Integrate Javascript admin in news module
«
Reply #8 on:
August 25, 2010, 11:00:59 AM »
hey,
it shows the calendar but dos not load any messages when I tested it (with news 3.5)
Logged
pcwacht
AddOn Development
Offline
Posts: 2859
Re: Integrate Javascript admin in news module
«
Reply #9 on:
August 25, 2010, 11:08:30 AM »
Did you add table prefix?
Logged
http://www.ictwacht.nl
= Dutch ICT info
http://www.pcwacht.nl
= My first
both still work in progress, since years.....
snark
Guest
Re: Integrate Javascript admin in news module
«
Reply #10 on:
August 25, 2010, 11:15:05 AM »
tried it with and without
it gives the calendarfolding out on mouse over
the text underneath says "Helaas geen events gevonden!" (too bad, nothing happening here)
but when clicking a date it keeps showing the spinning gif
and for the people thinking i am stupid: I have made a bunch of newsitems
Logged
pcwacht
AddOn Development
Offline
Posts: 2859
Re: Integrate Javascript admin in news module
«
Reply #11 on:
August 25, 2010, 12:22:52 PM »
Strange
haven't installed so can't look at it yet
sorry.
Logged
http://www.ictwacht.nl
= Dutch ICT info
http://www.pcwacht.nl
= My first
both still work in progress, since years.....
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: Integrate Javascript admin in news module
«
Reply #12 on:
August 25, 2010, 01:04:21 PM »
Check if your newsitems have starting date..
then
Do you have table prefix at all ?
If you do, around line 25 in agenda.class.php find:
Code:
$mysql = mysql_connect(DB_HOST, DB_USERNAME, DB_PASSWORD) or die("Could not connect to mysql server.");
mysql_select_db(DB_NAME, $mysql) or die("Could not select database.");
$sql = "SELECT `title`, `content_short`, `published_when` FROM `".TABLE_PREFIX."mod_news_posts` WHERE `published_when` >= {$start_date} ORDER BY `published_when` ASC";
now try to replace DB_HOST, user, pass, db_name and table prefix with your data:
Code:
$mysql = mysql_connect("localhost","root","password") or die("Could not connect to mysql server.");
mysql_select_db("myDB", $mysql) or die("Could not select database.");
$sql = "SELECT `title`, `content_short`, `published_when` FROM `_mod_news_posts` WHERE `published_when` >= {$start_date} ORDER BY `published_when` ASC";
try that..
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
snark
Guest
Re: Integrate Javascript admin in news module
«
Reply #13 on:
August 25, 2010, 02:50:47 PM »
hey, the newsitems are visible underneath the calendar on opening the page ..
but the links do not work
in calender.class.php @ line 74
Code:
$result .= "<td class=\"{$sClass}\"><a href=\"#\" rel=\"{$sDate}\" title=\"Bekijk agenda vanaf: {$sTitle}\">". $sDay. "</a></td>";
the link here is # ... I guess something has to be produced there but it doesn't ... it tries to bring me to #
Logged
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: Integrate Javascript admin in news module
«
Reply #14 on:
August 25, 2010, 03:34:22 PM »
Did you uploaded ajax.php from my post above to your root
It handles clicked links..
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
snark
Guest
Re: Integrate Javascript admin in news module
«
Reply #15 on:
August 25, 2010, 03:58:38 PM »
yes I uploaded it, i tried the root, the template, the includes file, ....
but how does the script know there is a ajax.php?
Logged
pcwacht
AddOn Development
Offline
Posts: 2859
Re: Integrate Javascript admin in news module
«
Reply #16 on:
August 25, 2010, 04:17:38 PM »
templatedir/js/common.m.js calls it
John
Logged
http://www.ictwacht.nl
= Dutch ICT info
http://www.pcwacht.nl
= My first
both still work in progress, since years.....
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: Integrate Javascript admin in news module
«
Reply #17 on:
August 25, 2010, 04:37:21 PM »
wierd... is it on some live site so I can take a look ?
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: Integrate Javascript admin in news module
«
Reply #18 on:
August 27, 2010, 08:26:36 AM »
did you follow steps from here:
http://www.websitebaker2.org/forum/index.php/topic,16631.msg127626.html#msg127626
Also, I forgot to mention, in template folder find index.php and comment error reporting line at the start of the file...
Then turn on error reporting in advanced Settings
cheers
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Pages: [
1
]
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
=> Security Announcements
=> Documentation
=> WebsiteBaker Website Showcase
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
=====> Modules / Extensions
===> Suggestions
===> Software bugs
=> Help & Support
=> Modules
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
=> jQuery
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
=> Archive (posts up to 2007)
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
=====> Module / Extensions
===> Vorschläge
===> Softwarefehler
===> Erfahrungs und Testberichte
=> Hilfe/Support
=> Module & Snippets
=> Templates & Design
=> Tutorials
=> jQuery
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...