This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Empty link creation

Is there a way to create an empty link in D8? What I want specifically is

<a href="javascript:void(0)">Link</a>

Url::fromUserInput('#', ['fragment' => '#']) creates an anchor tag with ## link.

Thanks

How to generate the encrypted Drupal7 password of a user from an external script?

Hi,

I'd like to generate the encrypted password of a user from a PHP script external to Drupal7.

I've tried this code but the output of the echo command changes each time I execute it.

Is it possible to generate the encrypted password with a script?

<?php
require_once '../includes/bootstrap.inc';
require_once '../includes/password.inc';
echo user_hash_password('11111111111');
?>

Thank you very much

cld

Views_Data_Export - .doc template - css help

I am looking to export a view to .doc

included in my export is a table. I am looking to set the table properties, text wrapping to NONE when exported to word.

I am using the views-data-export-doc-header.tpl.php file to add css style

I cannot find any css to apply NO text wrapping to an entire table. Can anyone help?

How to insert link in editor with node/nid but display as the alias when published?

When I'm editing a page, how can I add a link using the node # but when hovering over or copying shortcut takes the alias?

For example: 

In editor : <a href="/node/123"> My Link</a>

But on the published page it should display the alias "http://www.website.com/alias

This way if i update the alias on node/123, it will display "http://www.website.com/newalias" rather than the old alias and redirect.

Thanks!

Convert date as plain text to date format

Hello again,
I was able to add days to my date field using computed field and php code. Thanks to the help of wombatbuddy.
Now here is another problem:
1) The date in my computed field is in plain text format.
2) In views, using views conditonal, I want to compare my computed field (plain text date format) to current date (NOW). To be specific, in views condition - when date is less than NOW - then the output is OVERDUE.

Override date display

I have two fields in a component type entity.

1) Date (date range field, required).

2) Date Override (text field)

If a value for the date override field exists, I would like to use it in place of the Date field.

Which hook should I use to override the value of the date field?  A code example would be much appreciated.  Thanks!

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions