TOPIC:

Artikel-Veröffentlichungsdatum setzen / Article publication date record 3 years 7 months ago #221406

  • adlerauge1980's Avatar Topic Author
  • adlerauge1980
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 34
  • Thanks: 0
Hi Julian

i have insert $db->query(); and Change the Query to Form pieces /After Form and now it's work! soooo good!! Im big Happy!

One Question i have: Do you have any idea how to replace "WHERE ID = 67" (this is current static) ?
I need the query there, which is executed only on the just created article


$db = JFactory::getDBO();//Get Database Object

//Untenstehendes Querry ändert das Veröffentlichsdatum auf Jagdtag 16:00 minus 1 Tag und setzt den Artikel auf Veröffentlicht
$db->setQuery("UPDATE `jos_content`
SET `state`= 1,
`publish_up`= DATE_SUB(DATE_FORMAT(STR_TO_DATE( RIGHT(title,10), '%d-%m-%Y'), '%Y-%m-%d 16:00:00'), INTERVAL 1 DAY)

WHERE ID = 67
AND `state`= 0");

$db->query();
Verwende folgende Systeme / Komponenten in jeweils der aktuellsten Version:
- Joomla
- Breezingforms
- ContentBuilder

Please Log in or Create an account to join the conversation.

Artikel-Veröffentlichungsdatum setzen / Article publication date record 3 years 7 months ago #221427

  • JulianGracin's Avatar
  • JulianGracin
  • Offline
  • Developer
  • Developer
  • Posts: 673
  • Karma: 33
  • Thanks: 66
Hi,

You can try to replace the 'WHERE' line in your query:
WHERE ID = 67
with this:
WHERE ID = (SELECT MAX(id) from jos_content)

This will get the last inserted article in the database.

Try it out and let me know if it works.


Regards,
Julian
=========================================
Need to renew Pro Support?
Buy Here!
=========================================
Satisfied?
Consider a membership!
=========================================
Like us on Facebook
=========================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!

Please Log in or Create an account to join the conversation.

Artikel-Veröffentlichungsdatum setzen / Article publication date record 3 years 7 months ago #221516

  • adlerauge1980's Avatar Topic Author
  • adlerauge1980
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 34
  • Thanks: 0
Hi Julian

you are not good, you are sensational!!

It's fine work!

Thanks of a lot!

Wishing you a nice weekend
Regards

Roger
Verwende folgende Systeme / Komponenten in jeweils der aktuellsten Version:
- Joomla
- Breezingforms
- ContentBuilder

Please Log in or Create an account to join the conversation.

Artikel-Veröffentlichungsdatum setzen / Article publication date record 3 years 7 months ago #221571

  • JulianGracin's Avatar
  • JulianGracin
  • Offline
  • Developer
  • Developer
  • Posts: 673
  • Karma: 33
  • Thanks: 66
Hi,

I'm glad it's all working now.

If you have any other questions, feel free to ask.


Regards,
Julian
=========================================
Need to renew Pro Support?
Buy Here!
=========================================
Satisfied?
Consider a membership!
=========================================
Like us on Facebook
=========================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
The following user(s) said Thank You: adlerauge1980

Please Log in or Create an account to join the conversation.

Moderators: ForumSupport
Time to create page: 0.047 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!