Support

Home Forums Custom Files Add-on (EE3) [Espresso_Table] text formatting issue

[Espresso_Table] text formatting issue

Posted: December 26, 2012 at 5:32 pm


infosolwebadmin

December 26, 2012 at 5:32 pm

I’ve made a few adjustments to the espresso_table.php to get rid of the city/state columns, changed the register link to add it to the cart instead via a support post, and used some more code posted on the board to display the venue’s name instead of its address, seen here (I have show address set to false and show title set to true):

https://eventespresso.com/forums/2012/02/how-to-display-events-as-a-chart/comment-page-1/#comment-18828

It works fine, but the it is inheriting an H3 tag (I was inspecting it with google chrome’s basic developer tools), so the font in those columns is bigger than everything else in the other columns, seen here:

http://chisoftware.com/wp/?page_id=90&preview=true

I don’t know much about PHP (I can piece things together when the code is already made and I have references), but it looks like the address/venue portion is in a TD-class like all of the other columns in the PHP file. It’s just not inheriting that TD-class (and corresponding font) on the page in html. Any ideas on what I can do to fix this so the title inherits the same class as the other columns? When the address was set to show up it was in the same font as everything else, but the title isn’t cooperating. Is it defaulted to show up with an H3 class or something?

Also, how would I go about adding a column that allows people to click a ‘View Class Info’ link (or something to that degree) that would take them to that individual classes page? I see where you can set additional columns in lines 75-79, I’m just no familiar enough with PHP to setup the more complex code needed in lines 101-119 to make it work. I tried something out earlier and got the new column to show, but the text in the rows wasn’t displaying correctly.

Thanks


Dean

December 27, 2012 at 1:07 am

Hello Yolande,

Unfortunately you linked a preview and these arent viewable unless you have site Admin access. Is it possible you can provide a link to the publicly available page or paste the code into a service like pastebin?

Regarding the other column, I would use the original code.

<?php echo $register_button ?>

shows the register link which takes you to the individual events page. You can amend the wording by changing the code (approx line 94)

$register_button = '<a id="a_register_link-'.$event- rel="nofollow">id.'" href="'.get_option('siteurl').'/?page_id='.$event_page_id.'&regevent_action=register&event_id='.$event->id.'&name_of_event='.stripslashes_deep($event->event_name).'">Register</a>';

so that the Register says something else.


infosolwebadmin

December 27, 2012 at 11:12 am

That would probably help wouldn’t it! Forgot I hadn’t published it yet! Here it is:

http://chisoftware.com/wp/espresso-table-test

In regard to the add to cart/register question, I found this article:

https://eventespresso.com/wiki/multiple-events-registration-use-add-to-cart-link-instead-of-default-registration-form/

So, I guess I could always put an ‘add to cart’ link/button shortcode in the event description, unless there are some adverse effects I am unaware of?


Chris Reynolds

  • Support Staff

December 27, 2012 at 3:33 pm

So, I guess I could always put an ‘add to cart’ link/button shortcode in the event description, unless there are some adverse effects I am unaware of?

No adverse effects. However, if you are doing this instead of the regular reg process, you’ll want to remember to set Display Registration Form to No as it says in step 1 on that doc.


infosolwebadmin

December 28, 2012 at 10:17 am

Okay cool. Any input on the text issue I’m having in the location column seen in the link below? It seems to be inheriting a different tag than the text in the other columns .

http://chisoftware.com/wp/espresso-table-test

Thanks again


Dean

December 28, 2012 at 10:39 am

Hi Yolande,

It looks like the code has added a header tag to that section, this isnt CSS, it is likely to be the code itself. The default code doesnt have this so I would check the code you added to see if it has been added in. If you need to, feel free to paste the code into pastebin.


infosolwebadmin

December 28, 2012 at 12:34 pm

Here’s a link to pastebin: http://pastebin.com/47vHrnH4

I only put in the table that contains code that I modified. I added in the venu shortcode (found from another post) underneath address ?>


Dean

December 30, 2012 at 11:26 pm

Hi,

<?php echo do_shortcode('[ESPRESSO_VENUE event_id='.$event->id.' show_title="true" show_image="false" show_description="false" show_address="false" show_google_map_link="false" show_map_image="false" show_additional_details="false"]'); ?>

change it to

[ESPRESSO_VENUE event_id='1' show_title="true" show_image="false" show_description="false" show_address="false" show_google_map_link="false" show_map_image="false" show_additional_details="false" title_wrapper="p"]

Whats changed here is the addition of the title_wrapper attribute, this basically removes the H3 surrounding the title so your themes css wont style it differently.


infosolwebadmin

December 31, 2012 at 9:53 am

Awesome, thanks! I ended up changing it to “td-group” instead of “p”, because that’s what the other columns are set to. Using p causes the text to sit higher up in the cell and it was uneven with the other columns, but all is good now!

The support post ‘[Espresso_Table] text formatting issue’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso